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: db702217d416d19ff416a2b2f39347a4
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 qemu_arm rpi_0_w rpi_2
49 %define arch_configs qemu_arm rpi_2
52 %define arch_configs odroid-n2 pinebook-pro-rk3399 qemu_arm64
55 %define arch_configs qemu-x86
58 %define arch_configs qemu-x86_64
61 %define configs %{common_configs} %{?arch_configs}
63 %define rk3399_configs pinebook-pro-rk3399
65 %define imagedir %{_datadir}/uboot
68 Das U-Boot (Universal Bootloader, German for "the submarine") is a
69 boot loader for a number of different computer architectures,
70 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
72 %description -l pl.UTF-8
73 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
74 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
75 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
77 %package image-odroid-n2
78 Summary: U-Boot firmware images for Odroid N2/N2+
79 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
80 Group: Applications/System
81 Requires: %{name} = %{version}-%{release}
83 %description image-odroid-n2
84 U-Boot firmware images for Odroid N2/N2+.
86 %description image-odroid-n2 -l pl.UTF-8
87 Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
89 %package image-pinebook-pro
90 Summary: U-Boot firmware images for Pinebook Pro
91 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
92 Group: Applications/System
93 Requires: %{name} = %{version}-%{release}
95 %description image-pinebook-pro
96 U-Boot firmware images for Pinebook Pro.
98 %description image-pinebook-pro -l pl.UTF-8
99 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
102 Summary: U-Boot firmware images for QEMU
103 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla QEMU
104 Group: Applications/System
105 Requires: %{name} = %{version}-%{release}
107 %description image-qemu
108 U-Boot firmware images for QEMU.
110 %description image-qemu -l pl.UTF-8
111 Obrazy firmware'u U-Boot dla QEMU.
113 %package image-raspberry-pi-2
114 Summary: U-Boot firmware image for Raspberry Pi 2
115 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
116 Group: Applications/System
117 Requires: %{name} = %{version}-%{release}
119 %description image-raspberry-pi-2
120 U-Boot firmware image for Raspberry Pi 2.
122 %description image-raspberry-pi-2 -l pl.UTF-8
123 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
125 %package image-raspberry-pi-zero
126 Summary: U-Boot firmware image for Raspberry Pi Zero
127 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
128 Group: Applications/System
129 Requires: %{name} = %{version}-%{release}
131 %description image-raspberry-pi-zero
132 U-Boot firmware image for Raspberry Pi Zero.
134 %description image-raspberry-pi-zero -l pl.UTF-8
135 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
138 Summary: Generate kernel image for U-Boot
139 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
140 Group: Applications/System
143 This package contains the mkimage utility, which encapsulates a
144 compressed "uImage" Linux kernel image with header information, CRC32
145 checksum, etc., for use with the U-Boot bootloader.
147 mkimage can also be used to create ramdisk images for use with U-Boot,
148 either separated from the Linux kernel image, or combined into one
149 file. mkimage encapsulates the images with a 64 byte header containing
150 information about target architecture, operating system, image type,
151 compression method, entry points, time stamp, CRC32 checksums, etc.
153 %description mkimage -l pl.UTF-8
154 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
155 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
156 wykorzystania przez bootloader U-Boot.
158 mkimage może być używane także do tworzenia obrazów ramdysków do
159 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
160 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
161 nagłówek zawierający informacje o architekturze docelowej, systemie
162 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
163 czasie utworzenia, sumach kontrolnych CRC32 itp.
166 %setup -q -n u-boot-%{version}
167 %ifarch %{arm} aarch64
171 install -d build/hardkernel-uboot-odroid
172 tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
173 mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
174 cd build/hardkernel-uboot-odroid
187 for config in %configs; do
188 if echo ' %rk3399_configs ' | grep -q " $config "; then
189 mkdir -p build/$config
190 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
192 %{__make} ${config}_defconfig \
196 HOSTCFLAGS="%{rpmcflags}" \
197 HOSTLDFLAGS="%{rpmldflags}" \
201 $(test "$config" = "tools-only" && echo tools-only) \
206 HOSTCFLAGS="%{rpmcflags}" \
207 HOSTLDFLAGS="%{rpmldflags}" \
213 cd build/hardkernel-uboot-odroid
214 %{__make} odroidn2_defconfig \
218 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
219 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
220 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
221 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
227 rm -rf $RPM_BUILD_ROOT
228 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
230 for config in %configs; do
231 if [ "$config" = "tools-only" ]; then
232 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
233 elif echo ' %rk3399_configs ' | grep -q " $config "; then
234 install -d $RPM_BUILD_ROOT%{imagedir}/$config
235 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
236 elif [ $config = "odroid-n2" ]; then
237 install -d $RPM_BUILD_ROOT%{imagedir}/$config
238 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
240 install -d $RPM_BUILD_ROOT%{imagedir}/$config
241 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
246 rm -rf $RPM_BUILD_ROOT
249 %defattr(644,root,root,755)
250 %doc MAINTAINERS README
254 %files image-odroid-n2
255 %defattr(644,root,root,755)
256 %{imagedir}/odroid-n2
258 %files image-pinebook-pro
259 %defattr(644,root,root,755)
260 %{imagedir}/pinebook-pro-rk3399
263 %defattr(644,root,root,755)
264 %{imagedir}/qemu_arm64
267 %ifarch %{armv6} %{armv7}
269 %defattr(644,root,root,755)
272 %files image-raspberry-pi-2
273 %defattr(644,root,root,755)
278 %files image-raspberry-pi-zero
279 %defattr(644,root,root,755)
285 %defattr(644,root,root,755)
291 %defattr(644,root,root,755)
292 %{imagedir}/qemu-x86_64
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_bindir}/mkimage