about summary refs log tree commit diff
path: root/pkgs/misc/uboot
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/uboot')
-rw-r--r--pkgs/misc/uboot/nanonote.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/pkgs/misc/uboot/nanonote.nix b/pkgs/misc/uboot/nanonote.nix
index 2783927ef57c..fb3b98f478e6 100644
--- a/pkgs/misc/uboot/nanonote.nix
+++ b/pkgs/misc/uboot/nanonote.nix
@@ -1,8 +1,5 @@
 {stdenv, fetchurl, fetchgit}:
 
-# We should enable this check once we have the cross target system information
-# assert stdenv.system == "armv5tel-linux" || crossConfig == "armv5tel-linux";
-
 # All this file is made for the Marvell Sheevaplug
    
 stdenv.mkDerivation {
@@ -30,21 +27,19 @@ stdenv.mkDerivation {
     sed -i -e 's/0x200000;bootm/0x400000;bootm/' include/configs/qi_lb60.h
   '';
 
-  # Remove the cross compiler prefix, and add reiserfs support
+  makeFlags = [
+    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+  ];
+
+  # Add reiserfs support
   configurePhase = ''
     make mrproper
     make qi_lb60_config
-    sed -i /CROSS_COMPILE/d include/config.mk
   '';
 
-  buildPhase = ''
+  preBuild= ''
     # A variable named 'src' used to affect the build in some uboot...
-    unset src
-    if test -z "$crossConfig"; then
-        make clean all
-    else
-        make clean all ARCH=mips CROSS_COMPILE=$crossConfig-
-    fi
+    unset -v src
   '';
 
   dontStrip = true;
@@ -59,6 +54,6 @@ stdenv.mkDerivation {
   '';
 
   meta = {
-    platforms = [ "mipsel-linux" ];
+    platforms = stdenv.lib.platforms.mips;
   };
 }