2010-10-04 23:23:57 +01:00
|
|
|
{stdenv, fetchgit, unzip}:
|
|
|
|
|
|
|
|
# Marvell's branch of U-Boot for the GuruPlug.
|
|
|
|
|
|
|
|
let
|
|
|
|
# Aug 2010 revision of the `testing' branch of Marvell's U-Boot repository.
|
|
|
|
# See
|
|
|
|
# <http://www.openplug.org/plugwiki/index.php/Re-building_the_kernel_and_U-Boot>
|
|
|
|
# for details.
|
|
|
|
rev = "f106056095049c2c748c2a2797e5353295240e04";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2013-11-13 10:45:40 +00:00
|
|
|
name = "uboot-guruplug-0.0-pre-${stdenv.lib.strings.substring 0 7 rev}";
|
2010-10-04 23:23:57 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.denx.de/u-boot-marvell.git";
|
|
|
|
sha256 = "18gwyj16vml7aja9cyan51jwfcysy4cs062z7wmgdc0l9bha6iw7";
|
|
|
|
inherit rev;
|
|
|
|
};
|
|
|
|
|
|
|
|
patches =
|
|
|
|
[ ./guruplug-file-systems.patch ./guruplug-usb-msd-multi-lun.patch ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
# Remove the cross compiler prefix.
|
|
|
|
configurePhase = ''
|
|
|
|
make mrproper
|
|
|
|
make guruplug_config
|
|
|
|
sed -i /CROSS_COMPILE/d include/config.mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
unset src
|
|
|
|
if test -z "$crossConfig"; then
|
|
|
|
make all u-boot.kwb
|
|
|
|
else
|
|
|
|
make all u-boot.kwb ARCH=arm CROSS_COMPILE=$crossConfig-
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2010-10-04 23:23:57 +01:00
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2010-10-04 23:23:57 +01:00
|
|
|
cp -v u-boot u-boot.{kwb,map} $out
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2010-10-04 23:23:57 +01:00
|
|
|
cp tools/{envcrc,mkimage} $out/bin
|
|
|
|
'';
|
|
|
|
}
|