forked from mirrors/nixpkgs
Making the 'makeInitrd' expression use "platform"
svn path=/nixpkgs/branches/stdenv-updates/; revision=18292
This commit is contained in:
parent
7769ad11bd
commit
be2ff23280
|
@ -12,17 +12,15 @@
|
||||||
# `contents = {object = ...; symlink = /init;}' is a typical
|
# `contents = {object = ...; symlink = /init;}' is a typical
|
||||||
# argument.
|
# argument.
|
||||||
|
|
||||||
{stdenv, perl, cpio, contents, uboot ? null}:
|
{stdenv, perl, cpio, contents, platform}:
|
||||||
|
|
||||||
assert stdenv.system == "armv5tel-linux" -> uboot != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "initrd";
|
name = "initrd";
|
||||||
builder = ./make-initrd.sh;
|
builder = ./make-initrd.sh;
|
||||||
buildInputs = [perl cpio]
|
buildInputs = [perl cpio]
|
||||||
++ stdenv.lib.optional (stdenv.system == "armv5tel-linux") [ uboot ];
|
++ stdenv.lib.optional (platform.uboot != null) [ platform.uboot ];
|
||||||
|
|
||||||
makeUInitrd = if (stdenv.system == "armv5tel-linux") then true else false;
|
makeUInitrd = if (platform.uboot != null) then true else false;
|
||||||
|
|
||||||
# !!! should use XML.
|
# !!! should use XML.
|
||||||
objects = map (x: x.object) contents;
|
objects = map (x: x.object) contents;
|
||||||
|
|
|
@ -321,7 +321,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
|
makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
|
||||||
inherit stdenv perl cpio contents uboot;
|
inherit stdenv perl cpio contents platform;
|
||||||
};
|
};
|
||||||
|
|
||||||
makeSetupHook = script: runCommand "hook" {} ''
|
makeSetupHook = script: runCommand "hook" {} ''
|
||||||
|
|
Loading…
Reference in a new issue