diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-12-19 11:14:16 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-12-19 11:14:16 +0000 |
commit | 5bae851b1e72065ba5a98366493954b3bc79c4ae (patch) | |
tree | 4da060cef5c3f80d5c442b8d2dda05e59d7a1462 /pkgs/os-specific/linux/kernel/generic.nix | |
parent | 76fa225eaacbf8f7ad117a1352be87fef56b2bd7 (diff) | |
parent | 405bbecba137aaf92f984f51e06721fec1c5539d (diff) | |
download | nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar.gz nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar.bz2 nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar.lz nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar.xz nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.tar.zst nixlib-5bae851b1e72065ba5a98366493954b3bc79c4ae.zip |
Merging from trunk. I had to give away some structure to build the native
sheevaplug kernel, so the kernel does not build in the sheevaplug right now. I will try to fix that in next commits. svn path=/nixpkgs/branches/stdenv-updates/; revision=19045
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generic.nix')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 0536b562612a..6cc3ddc1228a 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -31,10 +31,6 @@ # "-my-kernel"). localVersion ? "" -, # A list of additional statements to be appended to the - # configuration file. - extraConfig ? [] - , preConfigure ? "" , extraMeta ? {} , platform ? { name = "pc"; uboot = null; } @@ -65,21 +61,23 @@ stdenv.mkDerivation { builder = ./builder.sh; - inherit preConfigure; + generateConfig = ./generate-config.pl; + + inherit preConfigure src module_init_tools localVersion; - inherit src config; - patches = map (p: p.patch) kernelPatches; - - extraConfig = - let addNewlines = map (s: "\n" + s + "\n"); - configFromPatches = - map (p: if p ? extraConfig then p.extraConfig else "") kernelPatches; - in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig)); - buildInputs = [perl mktemp] - ++ lib.optional (platform.uboot != null) [platform.uboot]; + kernelConfig = + let + configFromPatches = + map ({extraConfig ? "", ...}: extraConfig) kernelPatches; + in lib.concatStringsSep "\n" ([config] ++ configFromPatches); + # For UML, just ignore all options that don't apply (I'm lazy). + ignoreConfigErrors = userModeLinux; + + buildInputs = [ perl mktemp ] + ++ lib.optional (platform.uboot != null) [platform.uboot]; platformName = platform.name; @@ -91,13 +89,6 @@ stdenv.mkDerivation { if stdenv.system == "armv5tel-linux" then "arm" else abort "Platform ${stdenv.system} is not supported."; - makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else ""; - - inherit module_init_tools; - - allowLocalVersion = false; # don't allow patches to set a suffix - inherit localVersion; # but do allow the user to set one. - meta = { description = (if userModeLinux then |