mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
makeInitrd: don't assume uImage => arm
mips for example might use uImages too
This commit is contained in:
parent
a343ff7e14
commit
85e0ae7827
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user