diff options
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 8 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 8a0c1820717c..31af236ffae6 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -37,15 +37,13 @@ , preConfigure ? "" , extraMeta ? {} -, uboot ? null +, platform ? { uboot = null; } , ... }: assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" || stdenv.system == "armv5tel-linux"; -assert stdenv.system == "armv5tel-linux" -> uboot != null; - let lib = stdenv.lib; @@ -76,7 +74,7 @@ stdenv.mkDerivation { in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig)); buildInputs = [perl mktemp] - ++ lib.optional (stdenv.system == "armv5tel-linux") [uboot]; + ++ lib.optional (platform.uboot != null) [platform.uboot]; arch = if xen then "xen" else @@ -93,7 +91,7 @@ stdenv.mkDerivation { allowLocalVersion = false; # don't allow patches to set a suffix inherit localVersion; # but do allow the user to set one. - makeUImage = if (stdenv.system == "armv5tel-linux") then true else false; + makeUImage = if (platform.uboot != null) then true else false; meta = { description = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4015968ac5e5..18ec7f4f1897 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -424,6 +424,8 @@ let uboot = null; }; + platform = platformPC; + ### TOOLS darwinArchUtility = import ../os-specific/darwin/arch { @@ -5576,14 +5578,14 @@ let }; kernel_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) { - inherit fetchurl stdenv perl mktemp module_init_tools uboot; + inherit fetchurl stdenv perl mktemp module_init_tools platform; kernelPatches = []; }; kernel_2_6_31_zen5 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.31-zen5.nix) { inherit fetchurl stdenv perl mktemp module_init_tools lib builderDefs; - platform = getConfig [ "platform" ] platformPC; + inherit platform; }; kernel_2_6_31_zen5_bfs = kernel_2_6_31_zen5.override { |