diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2016-07-10 03:00:08 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2016-07-10 03:03:51 +0300 |
commit | 931706cdc129dc27a2948114de9f8aaa2c12d33f (patch) | |
tree | c8095cd0fd0822136350d89a4629010d1d3f3a81 /nixos/modules/system/boot/loader/generic-extlinux-compatible | |
parent | f9654a88e76703a80b8d1464f384bba21abeaf52 (diff) |
extlinux-conf-builder: Choose whether to use DTBs on per-generation basis
Previously, the value from stdenv.platform.kernelDTB was used. That
doesn't work well if both kinds (DTB and non-DTB) of generations exist
in the system profile.
Diffstat (limited to 'nixos/modules/system/boot/loader/generic-extlinux-compatible')
-rw-r--r-- | nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix index c5c250c14cea..576a07c1d272 100644 --- a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix +++ b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix @@ -5,5 +5,4 @@ pkgs.substituteAll { isExecutable = true; path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep]; inherit (pkgs) bash; - kernelDTB = pkgs.stdenv.platform.kernelDTB or false; } 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 78a8e8fd658c..c780a89b102c 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,10 @@ addEntry() { copyToKernelsDir "$path/kernel"; kernel=$result copyToKernelsDir "$path/initrd"; initrd=$result - if [ -n "@kernelDTB@" ]; then - # XXX UGLY: maybe the system config should have a top-level "dtbs" entry? - copyToKernelsDir $(readlink -m "$path/kernel/../dtbs"); dtbs=$result + # XXX UGLY: maybe the system config should have a top-level "dtbs" entry? + dtbDir=$(readlink -m "$path/kernel/../dtbs") + if [ -d "$dtbDir" ]; then + copyToKernelsDir "$dtbDir"; dtbs=$result fi timestampEpoch=$(stat -L -c '%Z' $path) @@ -95,7 +96,7 @@ addEntry() { fi echo " LINUX ../nixos/$(basename $kernel)" echo " INITRD ../nixos/$(basename $initrd)" - if [ -n "@kernelDTB@" ]; then + if [ -d "$dtbDir" ]; then echo " FDTDIR ../nixos/$(basename $dtbs)" fi echo " APPEND systemConfig=$path init=$path/init $extraParams" |