2010-02-17 20:53:01 +00:00
|
|
|
{stdenv, fetchurl, unzip}:
|
|
|
|
|
|
|
|
# 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 {
|
2012-06-09 08:27:40 +01:00
|
|
|
name = "uboot-sheevaplug-3.4.27";
|
2010-02-17 20:53:01 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.4.tar.bz2";
|
|
|
|
sha256 = "19vp4rlikz7h72pqsjhgz7nmgjy4c6vabvxkw67wni70vy5ddy8s";
|
|
|
|
};
|
|
|
|
|
|
|
|
srcAddon = fetchurl {
|
2012-06-09 08:27:40 +01:00
|
|
|
url = "http://www.plugcomputer.org/405/us/plug-basic/uboot/u-boot-3.4.27.zip";
|
|
|
|
sha256 = "1wqxznpdb6d2kx58gral4q0mg5ddxyrv7az8c6v29nr3cd9yrfsg";
|
2010-02-17 20:53:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
2012-06-09 08:27:40 +01:00
|
|
|
mv u-boot-1.1.4 u-boot-3.4.27
|
2010-02-17 20:53:01 +00:00
|
|
|
unzip -o $srcAddon
|
2012-06-09 08:27:40 +01:00
|
|
|
sourceRoot=u-boot-3.4.27
|
2010-02-17 20:53:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [ ./gas220.patch ];
|
|
|
|
|
|
|
|
# Remove the cross compiler prefix, and add reiserfs support
|
|
|
|
configurePhase = ''
|
|
|
|
make mrproper
|
|
|
|
make rd88f6281Sheevaplug_config NBOOT=1 LE=1
|
|
|
|
sed -i /CROSS_COMPILE/d include/config.mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
unset src
|
|
|
|
if test -z "$crossConfig"; then
|
|
|
|
make clean all
|
|
|
|
else
|
|
|
|
make clean all ARCH=arm CROSS_COMPILE=$crossConfig-
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2010-02-17 20:53:01 +00:00
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2010-02-17 20:53:01 +00:00
|
|
|
cp u-boot-rd88f6281Sheevaplug_400db_nand.bin $out
|
|
|
|
cp u-boot u-boot.map $out
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2010-02-17 20:53:01 +00:00
|
|
|
cp tools/{envcrc,mkimage} $out/bin
|
|
|
|
'';
|
2016-12-05 00:17:41 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = [ "armv5tel-linux" ];
|
|
|
|
};
|
2010-02-17 20:53:01 +00:00
|
|
|
}
|