Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloader-style automatic firmware updates are incompatible with make-disk-image.nix #276

Open
hacker1024 opened this issue Feb 14, 2025 · 0 comments · May be fixed by #277
Open

Bootloader-style automatic firmware updates are incompatible with make-disk-image.nix #276

hacker1024 opened this issue Feb 14, 2025 · 0 comments · May be fixed by #277

Comments

@hacker1024
Copy link
Contributor

hacker1024 commented Feb 14, 2025

Nixpkgs's make-disk-image.nix function, used for generating NixOS disk images, attempts to install the bootloader while running in a VM.

When hardware.nvidia-jetpack.firmware.autoUpdate is enabled, it adds the firmware update script to the bootloader installation command list. This isn't suitable for a VM, though, for the following reasons:

  • /sys/devices/virtual/dmi/id/bios_version doesn't exist, causing the update script (and transitively, the bootloader installation and disk image build) to exit 1
    • If the QEMU/UEFI setup in the VM changes in the future, it may start existing too, but its value will not be useful
  • NVRAM variables to configure the capsule update don't actually get set on the Jetson

To resolve these issues, there are at least three different solutions:

  1. exit 0 instead of exit 1 if /sys/devices/virtual/dmi/id/bios_version doesn't exist during bootloader installation. I don't think a failed firmware update attempt should necessarily indicate that the bootloader didn't get installed.
  2. Work out somehow if a VM is in use, and don't attempt to update at all.
  3. Work out somehow if a VM is in use, and update unconditionally. This will work as long as touchEFIVars is used to set the NVRAM on the Jetson.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant