1 Summary: Das U-Boot -- the Universal Boot Loader
2 Summary(pl.UTF-8): Das U-Boot - uniwersalny bootloader
7 Group: Applications/System
8 Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
9 # Source0-md5: b90cb4a3b8f02f18872197b052222d19
10 Source1: https://github.com/hardkernel/u-boot/archive/travis/odroidc4-189/odroid-189.tar.gz
11 # Source1-md5: dd117b6180ad5c9abb3303b31e57e7b4
12 Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
13 Patch2: odroid-n2-binutils-2.39.patch
14 Patch3: hardkernel-uboot-gcc5.patch
15 Patch4: hardkernel-uboot-werror.patch
16 Patch5: hardkernel-uboot-arm_cross.patch
17 Patch6: hardkernel-uboot-no_stdint.patch
18 Patch7: hardkernel-uboot-x86_64_bin.patch
19 Patch8: hardkernel-uboot-acs.patch
20 Patch9: hardkernel-uboot-uboot_payload.patch
21 URL: https://www.denx.de/wiki/U-Boot
25 BuildRequires: gnutls-devel
26 BuildRequires: libuuid-devel
27 BuildRequires: openssl-devel
28 BuildRequires: python3
29 BuildRequires: python3-elftools
30 BuildRequires: python3-libfdt
31 BuildRequires: python3-modules
32 BuildRequires: python3-setuptools
33 BuildRequires: rpmbuild(macros) >= 2.007
35 BuildRequires: arm-trusted-firmware-armv8
37 BuildRequires: crossarm-gcc
38 BuildRequires: qemu-user
39 BuildConflicts: libfdt-devel
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define common_configs tools-only
46 %define arch_configs rpi_0_w rpi_2
49 %define arch_configs rpi_2
52 %define arch_configs odroid-n2 pinebook-pro-rk3399
55 %define configs %{common_configs} %{?arch_configs}
57 %define rk3399_configs pinebook-pro-rk3399
59 %define imagedir %{_datadir}/uboot
62 Das U-Boot (Universal Bootloader, German for "the submarine") is a
63 boot loader for a number of different computer architectures,
64 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
66 %description -l pl.UTF-8
67 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
68 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
69 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
71 %package image-odroid-n2
72 Summary: U-Boot firmware images for Odroid N2/N2+
73 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
74 Group: Applications/System
75 Requires: %{name} = %{version}-%{release}
77 %description image-odroid-n2
78 U-Boot firmware images for Odroid N2/N2+.
80 %description image-odroid-n2 -l pl.UTF-8
81 Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
83 %package image-pinebook-pro
84 Summary: U-Boot firmware images for Pinebook Pro
85 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
86 Group: Applications/System
87 Requires: %{name} = %{version}-%{release}
89 %description image-pinebook-pro
90 U-Boot firmware images for Pinebook Pro.
92 %description image-pinebook-pro -l pl.UTF-8
93 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
95 %package image-raspberry-pi-2
96 Summary: U-Boot firmware image for Raspberry Pi 2
97 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
98 Group: Applications/System
99 Requires: %{name} = %{version}-%{release}
101 %description image-raspberry-pi-2
102 U-Boot firmware image for Raspberry Pi 2.
104 %description image-raspberry-pi-2 -l pl.UTF-8
105 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
107 %package image-raspberry-pi-zero
108 Summary: U-Boot firmware image for Raspberry Pi Zero
109 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
110 Group: Applications/System
111 Requires: %{name} = %{version}-%{release}
113 %description image-raspberry-pi-zero
114 U-Boot firmware image for Raspberry Pi Zero.
116 %description image-raspberry-pi-zero -l pl.UTF-8
117 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
120 Summary: Generate kernel image for U-Boot
121 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
122 Group: Applications/System
125 This package contains the mkimage utility, which encapsulates a
126 compressed "uImage" Linux kernel image with header information, CRC32
127 checksum, etc., for use with the U-Boot bootloader.
129 mkimage can also be used to create ramdisk images for use with U-Boot,
130 either separated from the Linux kernel image, or combined into one
131 file. mkimage encapsulates the images with a 64 byte header containing
132 information about target architecture, operating system, image type,
133 compression method, entry points, time stamp, CRC32 checksums, etc.
135 %description mkimage -l pl.UTF-8
136 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
137 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
138 wykorzystania przez bootloader U-Boot.
140 mkimage może być używane także do tworzenia obrazów ramdysków do
141 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
142 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
143 nagłówek zawierający informacje o architekturze docelowej, systemie
144 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
145 czasie utworzenia, sumach kontrolnych CRC32 itp.
148 %setup -q -n u-boot-%{version}
149 %ifarch %{arm} aarch64
153 install -d build/hardkernel-uboot-odroid
154 tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
155 mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
156 cd build/hardkernel-uboot-odroid
169 for config in %configs; do
170 if echo ' %rk3399_configs ' | grep -q " $config "; then
171 mkdir -p build/$config
172 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
174 %{__make} ${config}_defconfig \
178 HOSTCFLAGS="%{rpmcflags}" \
179 HOSTLDFLAGS="%{rpmldflags}" \
183 $(test "$config" = "tools-only" && echo tools-only) \
188 HOSTCFLAGS="%{rpmcflags}" \
189 HOSTLDFLAGS="%{rpmldflags}" \
195 cd build/hardkernel-uboot-odroid
196 %{__make} odroidn2_defconfig \
200 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
201 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
202 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
203 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
209 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
212 for config in %configs; do
213 if [ "$config" = "tools-only" ]; then
214 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
215 elif echo ' %rk3399_configs ' | grep -q " $config "; then
216 install -d $RPM_BUILD_ROOT%{imagedir}/$config
217 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
218 elif [ $config = "odroid-n2" ]; then
219 install -d $RPM_BUILD_ROOT%{imagedir}/$config
220 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
222 install -d $RPM_BUILD_ROOT%{imagedir}/$config
223 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
228 rm -rf $RPM_BUILD_ROOT
231 %defattr(644,root,root,755)
232 %doc MAINTAINERS README
236 %files image-odroid-n2
237 %defattr(644,root,root,755)
238 %{imagedir}/odroid-n2
240 %files image-pinebook-pro
241 %defattr(644,root,root,755)
242 %{imagedir}/pinebook-pro-rk3399
245 %ifarch %{armv6} %{armv7}
246 %files image-raspberry-pi-2
247 %defattr(644,root,root,755)
252 %files image-raspberry-pi-zero
253 %defattr(644,root,root,755)
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_bindir}/mkimage