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.
This commit is contained in:
parent
f9654a88e7
commit
931706cdc1
@ -5,5 +5,4 @@ pkgs.substituteAll {
|
|||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
||||||
inherit (pkgs) bash;
|
inherit (pkgs) bash;
|
||||||
kernelDTB = pkgs.stdenv.platform.kernelDTB or false;
|
|
||||||
}
|
}
|
||||||
|
@ -75,9 +75,10 @@ addEntry() {
|
|||||||
|
|
||||||
copyToKernelsDir "$path/kernel"; kernel=$result
|
copyToKernelsDir "$path/kernel"; kernel=$result
|
||||||
copyToKernelsDir "$path/initrd"; initrd=$result
|
copyToKernelsDir "$path/initrd"; initrd=$result
|
||||||
if [ -n "@kernelDTB@" ]; then
|
|
||||||
# XXX UGLY: maybe the system config should have a top-level "dtbs" entry?
|
# XXX UGLY: maybe the system config should have a top-level "dtbs" entry?
|
||||||
copyToKernelsDir $(readlink -m "$path/kernel/../dtbs"); dtbs=$result
|
dtbDir=$(readlink -m "$path/kernel/../dtbs")
|
||||||
|
if [ -d "$dtbDir" ]; then
|
||||||
|
copyToKernelsDir "$dtbDir"; dtbs=$result
|
||||||
fi
|
fi
|
||||||
|
|
||||||
timestampEpoch=$(stat -L -c '%Z' $path)
|
timestampEpoch=$(stat -L -c '%Z' $path)
|
||||||
@ -95,7 +96,7 @@ addEntry() {
|
|||||||
fi
|
fi
|
||||||
echo " LINUX ../nixos/$(basename $kernel)"
|
echo " LINUX ../nixos/$(basename $kernel)"
|
||||||
echo " INITRD ../nixos/$(basename $initrd)"
|
echo " INITRD ../nixos/$(basename $initrd)"
|
||||||
if [ -n "@kernelDTB@" ]; then
|
if [ -d "$dtbDir" ]; then
|
||||||
echo " FDTDIR ../nixos/$(basename $dtbs)"
|
echo " FDTDIR ../nixos/$(basename $dtbs)"
|
||||||
fi
|
fi
|
||||||
echo " APPEND systemConfig=$path init=$path/init $extraParams"
|
echo " APPEND systemConfig=$path init=$path/init $extraParams"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user