summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/generic.nix
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 00:32:12 +0000
commit4b27d2870197b26b7c170caa333944231715d4a3 (patch)
tree6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/os-specific/linux/kernel/generic.nix
parent6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff)
downloadnixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.gz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.bz2
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.lz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.xz
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.zst
nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.zip
Porting changes from stdenv-updates into this branch.
This comes from:
svn diff  ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff
patch -p0 < diff
and then adding into svn all files new from the patch.

trunk@18255 comes from the last time I updated stdenv-updates from trunk.


svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generic.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 909efca247e..31af236ffae 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -37,10 +37,12 @@
 
 , preConfigure ? ""
 , extraMeta ? {}
+, platform ? { uboot = null; }
 , ...
 }:
 
-assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
+assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
+  || stdenv.system == "armv5tel-linux";
 
 let
 
@@ -71,13 +73,15 @@ stdenv.mkDerivation {
           map (p: if p ? extraConfig then p.extraConfig else "") kernelPatches;
     in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig));
 
-  buildInputs = [perl mktemp];
+  buildInputs = [perl mktemp]
+    ++ lib.optional (platform.uboot != null) [platform.uboot];
   
   arch =
     if xen then "xen" else
     if userModeLinux then "um" else
     if stdenv.system == "i686-linux" then "i386" else
     if stdenv.system == "x86_64-linux" then "x86_64" else
+    if stdenv.system == "armv5tel-linux" then "arm" else
     abort "Platform ${stdenv.system} is not supported.";
 
   makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else "";
@@ -87,6 +91,8 @@ stdenv.mkDerivation {
   allowLocalVersion = false; # don't allow patches to set a suffix
   inherit localVersion; # but do allow the user to set one.
 
+  makeUImage = if (platform.uboot != null) then true else false;
+
   meta = {
     description =
       (if userModeLinux then