diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2019-08-16 13:26:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-16 13:26:48 -0400 |
commit | b750ebf1b3b4b45aea037c6bf6ac9f4faed4966f (patch) | |
tree | c6195fe37f9a6dab5a1884510030f9c834ecd2a4 /nixos/modules/system | |
parent | f426173e30d2f7dcc151b3d67a29ee6e8ca39c1a (diff) | |
parent | 766e0958b37402c62294872b6fd77b310d81cc38 (diff) |
Merge pull request #60422 from kwohlfahrt/device-tree
nixos/hardware.deviceTree: new module
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/activation/top-level.nix | 4 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 5c88d27b6c6..f67d2900561 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -46,8 +46,8 @@ let ln -s ${kernelPath} $out/kernel ln -s ${config.system.modulesTree} $out/kernel-modules - ${optionalString (pkgs.stdenv.hostPlatform.platform.kernelDTB or false) '' - ln -s ${config.boot.kernelPackages.kernel}/dtbs $out/dtbs + ${optionalString (config.hardware.deviceTree.package != null) '' + ln -s ${config.hardware.deviceTree.package} $out/dtbs ''} echo -n "$kernelParams" > $out/kernel-params diff --git a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh index c780a89b102..0092ee92b62 100644 --- a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh +++ b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh @@ -75,9 +75,8 @@ addEntry() { copyToKernelsDir "$path/kernel"; kernel=$result copyToKernelsDir "$path/initrd"; initrd=$result - # XXX UGLY: maybe the system config should have a top-level "dtbs" entry? - dtbDir=$(readlink -m "$path/kernel/../dtbs") - if [ -d "$dtbDir" ]; then + dtbDir=$(readlink -m "$path/dtbs") + if [ -e "$dtbDir" ]; then copyToKernelsDir "$dtbDir"; dtbs=$result fi |