summary refs log tree commit diff
path: root/pkgs/misc/uboot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/uboot/default.nix')
-rw-r--r--pkgs/misc/uboot/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix
index 7525c28e740..629537212bd 100644
--- a/pkgs/misc/uboot/default.nix
+++ b/pkgs/misc/uboot/default.nix
@@ -20,11 +20,11 @@ let
 in
 
 stdenv.mkDerivation {
-  name = "uboot-2009.11";
+  name = "uboot-2012.07";
    
   src = fetchurl {
-    url = "ftp://ftp.denx.de/pub/u-boot/u-boot-2009.11.tar.bz2";
-    sha256 = "1rld7q3ww89si84g80hqskd1z995lni5r5xc4d4322n99wqiarh6";
+    url = "ftp://ftp.denx.de/pub/u-boot/u-boot-2012.07.tar.bz2";
+    sha256 = "15nli6h9a127ldizsck3g4ysy5j4m910wawspgpadz4vjyk213p0";
   };
 
   buildNativeInputs = [ unzip ];
@@ -40,6 +40,15 @@ stdenv.mkDerivation {
     cp tools/{envcrc,mkimage} $out/bin
   '';
 
+  # They have 'errno.h' included by a "-idirafter". As the gcc
+  # wrappers add the glibc include as "-idirafter", the only way
+  # we can make the glibc take priority is to -include errno.h.
+  postPatch = if stdenv ? glibc && stdenv.glibc != null then ''
+    sed -i 's,$(HOSTCPPFLAGS),-include ${stdenv.glibc}/include/errno.h $(HOSTCPPFLAGS),' config.mk
+  '' else "";
+
+  patches = [ ./sheevaplug-sdio.patch ./sheevaplug-config.patch ];
+
   configurePhase =
     assert platform ? uboot && platform.uboot != null;
     assert (platform ? ubootConfig);