]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - u-boot/u-boot.nm
u-boot: Update to 2013.04-rc2.
[people/ms/ipfire-3.x.git] / u-boot / u-boot.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = u-boot
7 version = 2013.04
8 rc = 2
9 release = 0.1.rc%{rc}
10 thisapp = %{name}-%{version}-rc%{rc}
11 sup_arches = armv5tel armv7hl
12
13 groups = Development/Tools
14 url = http://www.denx.de/wiki/U-Boot
15 license = GPLv2+
16 summary = U-Boot utilities.
17
18 description
19 U-Boot is a Boot Loader, i.e. its primary purpose in the shipping
20 system is to load some operating system.
21 end
22
23 source_dl = ftp://ftp.denx.de/pub/u-boot/
24 sources = %{thisapp}.tar.bz2
25
26 build
27 requires
28 dtc
29 end
30
31 build
32 while read arch platform targets; do
33 # Skip all other architectures.
34 [ "${arch}" = "%{DISTRO_ARCH}" ] || continue
35
36 builddir="$(pwd)/build-${platform}"
37 mkdir -p ${builddir}
38
39 make CROSS_COMPILE="" O=${builddir} ${platform}_config
40 make HOSTCC="gcc %{CFLAGS}" CROSS_COMPILE="" O=${builddir}
41 done < %{DIR_SOURCE}/targets
42
43 # Build tools.
44 # Need to create a config because the tools won't build without.
45 make sheevaplug_config
46
47 make tools HOSTCC="gcc %{CFLAGS}" HOSTSTRIP="/bin/true" CROSS_COMPILE=""
48 make env HOSTCC="gcc %{CFLAGS}" HOSTSTRIP="/bin/true"
49 end
50
51 install
52 while read arch platform targets; do
53 # Skip all other architectures.
54 [ "${arch}" = "%{DISTRO_ARCH}" ] || continue
55
56 builddir="build-${platform}"
57 installdir="%{BUILDROOT}/usr/lib/%{name}/${platform}"
58 mkdir -pv ${installdir}
59
60 for target in ${targets}; do
61 install -D -m 644 ${builddir}/${target} ${installdir}
62 done
63 if [ -e "${builddir}/MLO" ]; then
64 install -D -m 644 ${builddir}/MLO ${installdir}
65 fi
66 for f in ${builddir}/spl/*.bin; do
67 [ -e "${f}" ] || continue
68 install -D -m 644 ${f} ${installdir}
69 done
70 done < %{DIR_SOURCE}/targets
71
72 # Install tools.
73 mkdir -pv %{BUILDROOT}/usr/bin %{BUILDROOT}/usr/share/man/man1
74 install -p -m 0755 tools/mkimage %{BUILDROOT}/usr/bin
75 install -p -m 0644 doc/mkimage.1 %{BUILDROOT}/usr/share/man/man1
76 install -p -m 0755 tools/env/fw_printenv %{BUILDROOT}/usr/bin
77 ln -svf fw_printenv %{BUILDROOT}/usr/bin/fw_setenv
78 end
79 end
80
81 packages
82 package %{name}
83
84 package %{name}-tools
85 summary = U-Boot utilities.
86 description
87 This package contains a few U-Boot utilities - mkimage
88 for creating boot images and fw_printenv/fw_setenv for
89 manipulating the boot environment variables.
90 end
91
92 files
93 /usr/bin
94 /usr/share/man/man1
95 end
96 end
97
98 package %{name}-debuginfo
99 template DEBUGINFO
100 end
101 end