From d82c7e0a69d186b3c83736fd5c2aed7b12a3f7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 15 Nov 2009 22:56:06 +0000 Subject: [PATCH] Adding uboot cross compilation. I had to adapt the package a bit, because it does not use autotools. svn path=/nixpkgs/branches/stdenv-updates/; revision=18362 --- pkgs/misc/uboot/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index eeb76df6221..ac3f49035a1 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, unzip}: -assert stdenv.system == "armv5tel-linux"; +# assert stdenv.system == "armv5tel-linux"; # All this file is made for the Marvell Sheevaplug @@ -34,7 +34,11 @@ stdenv.mkDerivation { buildPhase = '' unset src - make clean all + if test -z "$crossTarget"; then + make clean all + else + make clean all ARCH=arm CROSS_COMPILE=$crossTarget- + fi ''; buildInputs = [ unzip ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1a084e206b9..60c39c31bfe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6096,10 +6096,14 @@ let inherit (xlibs) libX11 xproto; };*/ - uboot = import ../misc/uboot { + uboot = makeOverridable (import ../misc/uboot) { inherit fetchurl stdenv unzip; }; + ubootArm = uboot.override { + stdenv = stdenvCross "armv5tel-unknown-linux-gnueabi"; + }; + uclibc = import ../os-specific/linux/uclibc { inherit fetchurl stdenv kernelHeaders; };