diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-08-04 11:07:13 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-08-04 11:07:13 +0000 |
commit | b17d1d7d07a91a79af432ca0330a879c954b5346 (patch) | |
tree | 31e5d17ed6bd8ac561aeeef35630d2e66570c44c /pkgs/misc/uboot/nanonote.nix | |
parent | 47b45f812e88a7b17abe7c90b90f2ac2236bfe94 (diff) | |
download | nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar.gz nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar.bz2 nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar.lz nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar.xz nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.tar.zst nixlib-b17d1d7d07a91a79af432ca0330a879c954b5346.zip |
Adding nanonote kernel and uboot
svn path=/nixpkgs/branches/stdenv-updates/; revision=22943
Diffstat (limited to 'pkgs/misc/uboot/nanonote.nix')
-rw-r--r-- | pkgs/misc/uboot/nanonote.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/misc/uboot/nanonote.nix b/pkgs/misc/uboot/nanonote.nix new file mode 100644 index 000000000000..9e39501a7a34 --- /dev/null +++ b/pkgs/misc/uboot/nanonote.nix @@ -0,0 +1,58 @@ +{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"; + sha256 = "8ae25853028930b418fad90637e0e68f9888285ba3ad1f720be45f08823ee855"; + }; + + patchPhase = '' + cp -R $srcPatches/package/uboot-xburst/files/* . + for a in $srcPatches/package/uboot-xburst/patches/*; do + patch -p1 < $a + done + chmod +w -R * + ''; + + # 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; + NIX_STRIP_DEBUG = false; + + installPhase = '' + ensureDir $out + cp u-boot-nand.bin $out + cp u-boot u-boot.map $out + + ensureDir $out/bin + cp tools/{envcrc,mkimage} $out/bin + ''; +} |