-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
nixos/systemd-boot: add support for devicetree entry #319422
Conversation
How do we feel about how this relates to the inclusion of device trees in bootspec v2? |
be5f8f7
to
738a5b3
Compare
I think we can add it as an extension pending bootspec V2 RFC completion. |
738a5b3
to
9263587
Compare
Hi. I'm testing this instead of my attempt in #331003. I noticed there's a newline missing:
note how the Otherwise, this is sharp, definitely nicer than my approach. I'd love to see something like this make it in. |
9263587
to
615453d
Compare
Thanks @colemickens! I hadn't been able to get around to testing after the latest rebase, should be good now |
@ofborg test systemd-boot.basic systemd-boot.bootCounting |
@jmbaur seems fixed. I don't want to ask too much, but a new test for this would be cool. |
Not too much at all, we should be able to use qemu's |
The [Boot Loader Specification](https://uapi-group.org/specifications/specs/boot_loader_specification/) allows for using a key called "devicetree" for specifying which devicetree the bootloader should use during boot. With regards to systemd-boot, this key is used to specify which file should be picked up from the ESP to install to the EFI DTB Configuration Table. Linux then uses this Configuration Table to setup the machine. This change is similar to the one done in NixOS#295096, where that change was for adding DTB support to systemd-stub, and this is for systemd-boot.
615453d
to
22199c7
Compare
So testing this in an actually bootable scenario isn't as straightforward as I thought it might be. Since qemu will create the devicetree blob based on the configured peripherals requested on the command line at runtime, we would have to duplicate all the flags that the test framework passes in order to take advantage of the |
Shoot, the comment button is too close to the |
@ofborg test systemd-boot.specialisation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me although I did not test this on real hardware.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/announcing-abandoning-nixos-snapdragon-elite/50422/1 |
Description of changes
The Boot Loader Specification allows for using a key called "devicetree" for specifying which devicetree the bootloader should use during boot. With regards to systemd-boot, this key is used to specify which file should be picked up from the ESP to install to the EFI DTB Configuration Table. Linux then uses this Configuration Table to setup the machine. This change is similar to the one done in #295096, where that change was for adding DTB support to systemd-stub, and this is for systemd-boot.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.