Unverified Commit 2837c0d9 authored by Jared Baur's avatar Jared Baur
Browse files

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.
parent ee0bc95d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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}";
      };
    };