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