makeInitrd: don't assume uImage => arm

mips for example might use uImages too
This commit is contained in:
Linus Heckemann 2020-09-03 14:17:07 +02:00
parent a343ff7e14
commit 85e0ae7827
2 changed files with 3 additions and 2 deletions

@ -18,6 +18,7 @@
, prepend ? []
, lib
, makeUInitrd ? stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage"
, uInitrdArch ? stdenvNoCC.hostPlatform.parsed.cpu.family
}:
let
# !!! Move this into a public lib function, it is probably useful for others
@ -25,7 +26,7 @@ let
lib.concatStringsSep "-" (filter (x: !(isList x)) (split "[^a-zA-Z0-9_=.?-]+" x));
in stdenvNoCC.mkDerivation rec {
inherit name makeUInitrd;
inherit name makeUInitrd uInitrdArch;
builder = ./make-initrd.sh;

@ -44,5 +44,5 @@ done
if [ -n "$makeUInitrd" ]; then
mv $out/initrd $out/initrd.gz
mkimage -A arm -O linux -T ramdisk -C gzip -d $out/initrd.gz $out/initrd
mkimage -A $uInitrdArch -O linux -T ramdisk -C gzip -d $out/initrd.gz $out/initrd
fi