makeInitrd: Make the compressor configurable
This commit is contained in:
parent
7dfd7a93d4
commit
79c3f992b4
@ -12,7 +12,7 @@
|
|||||||
# `contents = {object = ...; symlink = /init;}' is a typical
|
# `contents = {object = ...; symlink = /init;}' is a typical
|
||||||
# argument.
|
# argument.
|
||||||
|
|
||||||
{stdenv, perl, cpio, contents, ubootChooser}:
|
{stdenv, perl, cpio, contents, ubootChooser, compressor}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inputsFun = ubootName : [perl cpio]
|
inputsFun = ubootName : [perl cpio]
|
||||||
@ -40,4 +40,5 @@ stdenv.mkDerivation {
|
|||||||
buildNativeInputs = inputsFun stdenv.cross.platform.uboot;
|
buildNativeInputs = inputsFun stdenv.cross.platform.uboot;
|
||||||
makeUInitrd = makeUInitrdFun stdenv.cross.platform.uboot;
|
makeUInitrd = makeUInitrdFun stdenv.cross.platform.uboot;
|
||||||
};
|
};
|
||||||
|
inherit compressor;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ storePaths=$(perl $pathsFromGraph closure-*)
|
|||||||
|
|
||||||
# Put the closure in a gzipped cpio archive.
|
# Put the closure in a gzipped cpio archive.
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
(cd root && find * -print0 | cpio -o -H newc --null | gzip -9 > $out/initrd)
|
(cd root && find * -print0 | cpio -o -H newc --null | $compressor > $out/initrd)
|
||||||
|
|
||||||
if [ -n "$makeUInitrd" ]; then
|
if [ -n "$makeUInitrd" ]; then
|
||||||
mv $out/initrd $out/initrd.gz
|
mv $out/initrd $out/initrd.gz
|
||||||
|
@ -323,9 +323,10 @@ let
|
|||||||
inherit lib;
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
|
makeInitrd = {contents, compressor ? "gzip -9"}:
|
||||||
inherit stdenv perl cpio contents ubootChooser;
|
import ../build-support/kernel/make-initrd.nix {
|
||||||
};
|
inherit stdenv perl cpio contents ubootChooser compressor;
|
||||||
|
};
|
||||||
|
|
||||||
makeWrapper = makeSetupHook { } ../build-support/setup-hooks/make-wrapper.sh;
|
makeWrapper = makeSetupHook { } ../build-support/setup-hooks/make-wrapper.sh;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user