nixos/uki: add ".dtb" section if devicetree is used
This ensures a ".dtb" PE section makes it into the UKI so systemd-stub can install the correct devicetree for use by the Linux kernel. This is often needed on systems that boot with u-boot since the devicetree used by u-boot is often a paired down version of what the Linux kernel needs. On those kinds of boards, the lack of this PE section means that u-boot will end up installing its internal devicetree into the UEFI configuration table, which is what the Linux kernel ends up using.
This commit is contained in:
parent
ee0bc95d48
commit
2837c0d9aa
1 changed files with 2 additions and 0 deletions
|
@ -75,6 +75,8 @@ in
|
|||
OSRelease = lib.mkOptionDefault "@${config.system.build.etc}/etc/os-release";
|
||||
# This is needed for cross compiling.
|
||||
EFIArch = lib.mkOptionDefault efiArch;
|
||||
} // lib.optionalAttrs (config.hardware.deviceTree.enable && config.hardware.deviceTree.name != null) {
|
||||
DeviceTree = lib.mkOptionDefault "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue