diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 92142b5ef43..96268577696 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -12,17 +12,15 @@ # `contents = {object = ...; symlink = /init;}' is a typical # argument. -{stdenv, perl, cpio, contents, uboot ? null}: - -assert stdenv.system == "armv5tel-linux" -> uboot != null; +{stdenv, perl, cpio, contents, platform}: stdenv.mkDerivation { name = "initrd"; builder = ./make-initrd.sh; 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. objects = map (x: x.object) contents; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18ec7f4f189..5f573042f09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -321,7 +321,7 @@ let }; 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" {} ''