2010-08-04 05:07:13 -06:00
|
|
|
{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 {
|
|
|
|
name = "uboot-qb-2010.06";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.denx.de/pub/u-boot/u-boot-2010.06.tar.bz2";
|
|
|
|
sha256 = "1j0bl8x5i5m1pn62z450gbw30pbrj7sgs3fjp2l2giczv49cn33r";
|
|
|
|
};
|
|
|
|
|
|
|
|
srcPatches = fetchgit {
|
|
|
|
url = "git://projects.qi-hardware.com/openwrt-xburst.git";
|
|
|
|
rev = "3244d5ef9f93802f9b9b6f4405636424abf6fa83";
|
2016-06-02 05:26:44 -06:00
|
|
|
sha256 = "0mg87s10hpz41dr1zbd3bcl8i64gwvh3f1nrz8cb8c49099miqla";
|
2010-08-04 05:07:13 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
cp -R $srcPatches/package/uboot-xburst/files/* .
|
|
|
|
for a in $srcPatches/package/uboot-xburst/patches/*; do
|
|
|
|
patch -p1 < $a
|
|
|
|
done
|
|
|
|
chmod +w -R *
|
2010-11-23 13:46:45 -07:00
|
|
|
sed -i -e 's/console=ttyS0,57600n8//' include/configs/qi_lb60.h
|
2012-01-07 02:20:16 -07:00
|
|
|
# Load more than 2MiB for the kernel
|
|
|
|
sed -i -e 's/0x200000;bootm/0x400000;bootm/' include/configs/qi_lb60.h
|
2010-08-04 05:07:13 -06:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Remove the cross compiler prefix, and add reiserfs support
|
|
|
|
configurePhase = ''
|
|
|
|
make mrproper
|
|
|
|
make qi_lb60_config
|
|
|
|
sed -i /CROSS_COMPILE/d include/config.mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 13:16:00 -07:00
|
|
|
mkdir -p $out
|
2010-08-04 05:07:13 -06:00
|
|
|
cp u-boot-nand.bin $out
|
|
|
|
cp u-boot u-boot.map $out
|
|
|
|
|
2012-01-18 13:16:00 -07:00
|
|
|
mkdir -p $out/bin
|
2010-08-04 05:07:13 -06:00
|
|
|
cp tools/{envcrc,mkimage} $out/bin
|
|
|
|
'';
|
2016-12-04 17:17:41 -07:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = [ "mipsel-linux" ];
|
|
|
|
};
|
2010-08-04 05:07:13 -06:00
|
|
|
}
|