From 7b4529cfc7b1012fc76280647f64bb8d25c37a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 17 Feb 2010 21:09:27 +0000 Subject: [PATCH] Allowing multiplatform uboot (sheevaplug/integratorcp). svn path=/nixpkgs/trunk/; revision=20079 --- pkgs/misc/uboot/default.nix | 11 +++-------- pkgs/top-level/all-packages.nix | 4 ++-- pkgs/top-level/platforms.nix | 13 ++++++++++++- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index bbb1f8acc72..262d976730f 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -1,10 +1,5 @@ -{stdenv, fetchurl, unzip}: +{stdenv, fetchurl, unzip, platform}: -# 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 { name = "uboot-2009.11"; @@ -18,7 +13,7 @@ stdenv.mkDerivation { # Remove the cross compiler prefix, and add reiserfs support configurePhase = '' make mrproper - make sheevaplug_config NBOOT=1 LE=1 + make ${platform.ubootConfig} NBOOT=1 LE=1 sed -i /CROSS_COMPILE/d include/config.mk ''; @@ -27,7 +22,7 @@ stdenv.mkDerivation { if test -z "$crossConfig"; then make clean all else - make clean all ARCH=arm CROSS_COMPILE=$crossConfig- + make clean all ARCH=${platform.kernelArch} CROSS_COMPILE=$crossConfig- fi ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b0b1801e4fb..c434478d5fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6337,10 +6337,10 @@ let };*/ uboot = makeOverridable (import ../misc/uboot) { - inherit fetchurl stdenv unzip; + inherit fetchurl stdenv unzip platform; }; - ubootSheevaplug = makeOverridable (import ../misc/uboot) { + ubootSheevaplug = makeOverridable (import ../misc/uboot/sheevaplug.nix) { inherit fetchurl stdenv unzip; }; diff --git a/pkgs/top-level/platforms.nix b/pkgs/top-level/platforms.nix index 305b4dbd537..1d0d526829c 100644 --- a/pkgs/top-level/platforms.nix +++ b/pkgs/top-level/platforms.nix @@ -47,7 +47,9 @@ with pkgs; SCSI_ACARD n BLK_DEV_CMD640_ENHANCED n ''; - inherit uboot; + uboot = ubootSheevaplug; + # Only for uboot = uboot : + ubootConfig = "sheevaplug_config"; }; versatileARM = assert system == "armv5tel-linux"; { @@ -57,4 +59,13 @@ with pkgs; kernelAutoModules = false; uboot = null; }; + + integratorCP = { + name = "integratorCP"; + kernelBaseConfig = "integrator_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + uboot = null; + ubootConfig = "integratorcp_config"; + }; }