fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, fetchurl, bc, dtc
2, toolsOnly ? false
3, defconfig ? "allnoconfig"
4, targetPlatforms
5, filesToInstall
6}:
7
8let
9 platform = stdenv.platform;
10 crossPlatform = stdenv.cross.platform;
11 makeTarget = if toolsOnly then "tools NO_SDL=1" else "all";
12 installDir = if toolsOnly then "$out/bin" else "$out";
13 buildFun = kernelArch:
14 ''
15 if test -z "$crossConfig"; then
16 make ${makeTarget}
17 else
18 make ${makeTarget} ARCH=${kernelArch} CROSS_COMPILE=$crossConfig-
19 fi
20 '';
21in
22
23stdenv.mkDerivation rec {
24 name = "uboot-${defconfig}-${version}";
25 version = "2015.04";
26
27 src = fetchurl {
28 url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2";
29 sha256 = "0q2x1wh1f6rjh9rmcnkf28dxcvp9hkhi4vzspqkzamb6b3gp06ha";
30 };
31
32 patches = [ ./vexpress-Use-config_distro_bootcmd.patch ];
33
34 nativeBuildInputs = [ bc dtc ];
35
36 configurePhase = ''
37 make ${defconfig}
38 '';
39
40 buildPhase = assert (platform ? kernelArch);
41 buildFun platform.kernelArch;
42
43 installPhase = ''
44 mkdir -p ${installDir}
45 cp ${stdenv.lib.concatStringsSep " " filesToInstall} ${installDir}
46 '';
47
48 dontStrip = !toolsOnly;
49
50 crossAttrs = {
51 buildPhase = assert (crossPlatform ? kernelArch);
52 buildFun crossPlatform.kernelArch;
53 };
54
55 meta = with stdenv.lib; {
56 homepage = "http://www.denx.de/wiki/U-Boot/";
57 description = "Boot loader for embedded systems";
58 license = licenses.gpl2;
59 maintainers = [ maintainers.dezgeg ];
60 platforms = targetPlatforms;
61 };
62}