mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
extlinux-conf-builder: Make it work on non-DTB systems
With this, boot.loader.generic-extlinux-compatible can be used with linuxPackages_rpi on the Raspberry Pi.
This commit is contained in:
parent
6147909f8e
commit
8496f71e92
@ -3,6 +3,7 @@
|
||||
pkgs.substituteAll {
|
||||
src = ./extlinux-conf-builder.sh;
|
||||
isExecutable = true;
|
||||
inherit (pkgs) bash;
|
||||
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
||||
inherit (pkgs) bash;
|
||||
kernelDTB = pkgs.stdenv.platform.kernelDTB or false;
|
||||
}
|
||||
|
@ -75,8 +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
|
||||
fi
|
||||
|
||||
timestampEpoch=$(stat -L -c '%Z' $path)
|
||||
|
||||
@ -93,7 +95,9 @@ addEntry() {
|
||||
fi
|
||||
echo " LINUX ../nixos/$(basename $kernel)"
|
||||
echo " INITRD ../nixos/$(basename $initrd)"
|
||||
if [ -n "@kernelDTB@" ]; then
|
||||
echo " FDTDIR ../nixos/$(basename $dtbs)"
|
||||
fi
|
||||
echo " APPEND systemConfig=$path init=$path/init $extraParams"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user