2009-11-08 01:32:12 +01:00
|
|
|
{stdenv, fetchurl, unzip}:
|
|
|
|
|
- Removed all *NoCross expressions I dupilcated in nixpkgs, while maintaining
the cross compilation functionality.
- I renamed some expected stdenv.mkDerivation parameter attributes so we can
keep this branch properly updated from trunk. We agreed with Nicolas Pierron
doing a massive renaming, so all current buildInputs become hostInputs (input
as build for the host machine, in autotools terminology) , and
then buildInputs would mean "input as for the build machine".
By now, the specific "input as for the build machine" is specified through
buildNativeInputs. We should fix this in the merge to trunk.
- I made the generic stdenv understand the buildNativeInputs, otherwise if
we start changing nixpkgs expressions so they distinguish the current
buildInputs into buildInputs and buildNativeInputs, we could break even more
nixpkgs for other platforms.
- I changed the default result of mkDerivation so it becomes the derivation for
to be run in the build machine. This allows, without any special rewriting,
"fetchurl" derivations to be always results for the build machine to use
them.
- The change above implies that, for anyone wanting to cross-compile, has to
build the hostDrv of the wanted derivation. For example, after this commit,
the usual test of "nix-build -A bison.hostDrv arm.nix" works. I described
the contents of this arm.nix in r18398.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18471
2009-11-19 20:03:34 +01:00
|
|
|
# We should enable this check once we have the cross target system information
|
|
|
|
# assert stdenv.system == "armv5tel-linux" || crossConfig == "armv5tel-linux";
|
2009-11-08 01:32:12 +01:00
|
|
|
|
|
|
|
# All this file is made for the Marvell Sheevaplug
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-02-17 21:53:01 +01:00
|
|
|
name = "uboot-2009.11";
|
2009-11-08 01:32:12 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-02-17 21:53:01 +01:00
|
|
|
url = "ftp://ftp.denx.de/pub/u-boot/u-boot-2009.11.tar.bz2";
|
|
|
|
sha256 = "1rld7q3ww89si84g80hqskd1z995lni5r5xc4d4322n99wqiarh6";
|
2009-11-08 01:32:12 +01:00
|
|
|
};
|
|
|
|
|
2010-02-17 21:53:01 +01:00
|
|
|
# patches = [ ./gas220.patch ];
|
2009-11-08 01:32:12 +01:00
|
|
|
|
|
|
|
# Remove the cross compiler prefix, and add reiserfs support
|
|
|
|
configurePhase = ''
|
|
|
|
make mrproper
|
2010-02-17 21:53:01 +01:00
|
|
|
make sheevaplug_config NBOOT=1 LE=1
|
2009-11-08 01:32:12 +01:00
|
|
|
sed -i /CROSS_COMPILE/d include/config.mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
unset src
|
2009-11-19 22:43:03 +01:00
|
|
|
if test -z "$crossConfig"; then
|
2009-11-15 23:56:06 +01:00
|
|
|
make clean all
|
|
|
|
else
|
- Removed all *NoCross expressions I dupilcated in nixpkgs, while maintaining
the cross compilation functionality.
- I renamed some expected stdenv.mkDerivation parameter attributes so we can
keep this branch properly updated from trunk. We agreed with Nicolas Pierron
doing a massive renaming, so all current buildInputs become hostInputs (input
as build for the host machine, in autotools terminology) , and
then buildInputs would mean "input as for the build machine".
By now, the specific "input as for the build machine" is specified through
buildNativeInputs. We should fix this in the merge to trunk.
- I made the generic stdenv understand the buildNativeInputs, otherwise if
we start changing nixpkgs expressions so they distinguish the current
buildInputs into buildInputs and buildNativeInputs, we could break even more
nixpkgs for other platforms.
- I changed the default result of mkDerivation so it becomes the derivation for
to be run in the build machine. This allows, without any special rewriting,
"fetchurl" derivations to be always results for the build machine to use
them.
- The change above implies that, for anyone wanting to cross-compile, has to
build the hostDrv of the wanted derivation. For example, after this commit,
the usual test of "nix-build -A bison.hostDrv arm.nix" works. I described
the contents of this arm.nix in r18398.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18471
2009-11-19 20:03:34 +01:00
|
|
|
make clean all ARCH=arm CROSS_COMPILE=$crossConfig-
|
2009-11-15 23:56:06 +01:00
|
|
|
fi
|
2009-11-08 01:32:12 +01:00
|
|
|
'';
|
|
|
|
|
2009-11-19 22:43:03 +01:00
|
|
|
buildNativeInputs = [ unzip ];
|
2009-11-08 01:32:12 +01:00
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
NIX_STRIP_DEBUG = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out
|
2010-02-17 21:53:01 +01:00
|
|
|
cp u-boot.bin $out
|
2009-11-08 01:32:12 +01:00
|
|
|
cp u-boot u-boot.map $out
|
|
|
|
|
|
|
|
ensureDir $out/bin
|
|
|
|
cp tools/{envcrc,mkimage} $out/bin
|
|
|
|
'';
|
|
|
|
}
|