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: 49ba74a214d14c6340c8067bc1ed5fa0
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 Patch1: %{name}-pbp_usb_hang.patch
14 Patch2: rk3399-emmc.patch
15 Patch3: hardkernel-uboot-gcc5.patch
16 Patch4: hardkernel-uboot-werror.patch
17 Patch5: hardkernel-uboot-arm_cross.patch
18 Patch6: hardkernel-uboot-no_stdint.patch
19 Patch7: hardkernel-uboot-x86_64_bin.patch
20 Patch8: hardkernel-uboot-acs.patch
21 Patch9: hardkernel-uboot-uboot_payload.patch
22 URL: https://www.denx.de/wiki/U-Boot
26 BuildRequires: openssl-devel
27 BuildRequires: rpmbuild(macros) >= 2.007
29 BuildRequires: arm-trusted-firmware-armv8
31 BuildRequires: crossarm-gcc
32 BuildRequires: qemu-user
33 BuildConflicts: libfdt-devel
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define common_configs tools-only
40 %define arch_configs rpi_0_w rpi_2
43 %define arch_configs rpi_2
46 %define arch_configs odroid-n2 pinebook-pro-rk3399
49 %define configs %{common_configs} %{?arch_configs}
51 %define rk3399_configs pinebook-pro-rk3399
53 %define imagedir %{_datadir}/uboot
56 Das U-Boot (Universal Bootloader, German for "the submarine") is a
57 boot loader for a number of different computer architectures,
58 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
60 %description -l pl.UTF-8
61 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
62 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
63 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
65 %package image-odroid-n2
66 Summary: U-Boot firmware images for Odroid N2/N2+
67 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
68 Group: Applications/System
70 %description image-odroid-n2
71 U-Boot firmware images for Odroid N2/N2+.
73 %description image-odroid-n2 -l pl.UTF-8
74 Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
76 %package image-pinebook-pro
77 Summary: U-Boot firmware images for Pinebook Pro
78 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
79 Group: Applications/System
81 %description image-pinebook-pro
82 U-Boot firmware images for Pinebook Pro.
84 %description image-pinebook-pro -l pl.UTF-8
85 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
87 %package image-raspberry-pi-2
88 Summary: U-Boot firmware image for Raspberry Pi 2
89 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
90 Group: Applications/System
92 %description image-raspberry-pi-2
93 U-Boot firmware image for Raspberry Pi 2.
95 %description image-raspberry-pi-2 -l pl.UTF-8
96 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
98 %package image-raspberry-pi-zero
99 Summary: U-Boot firmware image for Raspberry Pi Zero
100 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
101 Group: Applications/System
103 %description image-raspberry-pi-zero
104 U-Boot firmware image for Raspberry Pi Zero.
106 %description image-raspberry-pi-zero -l pl.UTF-8
107 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
110 Summary: Generate kernel image for U-Boot
111 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
112 Group: Applications/System
115 This package contains the mkimage utility, which encapsulates a
116 compressed "uImage" Linux kernel image with header information, CRC32
117 checksum, etc., for use with the U-Boot bootloader.
119 mkimage can also be used to create ramdisk images for use with U-Boot,
120 either separated from the Linux kernel image, or combined into one
121 file. mkimage encapsulates the images with a 64 byte header containing
122 information about target architecture, operating system, image type,
123 compression method, entry points, time stamp, CRC32 checksums, etc.
125 %description mkimage -l pl.UTF-8
126 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
127 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
128 wykorzystania przez bootloader U-Boot.
130 mkimage może być używane także do tworzenia obrazów ramdysków do
131 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
132 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
133 nagłówek zawierający informacje o architekturze docelowej, systemie
134 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
135 czasie utworzenia, sumach kontrolnych CRC32 itp.
138 %setup -q -n u-boot-%{version}
139 %ifarch %{arm} aarch64
145 install -d build/hardkernel-uboot-odroid
146 tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
147 mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
148 cd build/hardkernel-uboot-odroid
160 for config in %configs; do
161 if echo ' %rk3399_configs ' | grep -q " $config "; then
162 mkdir -p build/$config
163 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
165 %{__make} ${config}_defconfig \
169 HOSTCFLAGS="%{rpmcflags}" \
170 HOSTLDFLAGS="%{rpmldflags}" \
174 $(test "$config" = "tools-only" && echo tools-only) \
178 HOSTCFLAGS="%{rpmcflags}" \
179 HOSTLDFLAGS="%{rpmldflags}" \
184 cd build/hardkernel-uboot-odroid
185 %{__make} odroidn2_defconfig \
189 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
190 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
191 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
192 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
198 rm -rf $RPM_BUILD_ROOT
199 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
201 for config in %configs; do
202 if [ "$config" = "tools-only" ]; then
203 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
204 elif echo ' %rk3399_configs ' | grep -q " $config "; then
205 install -d $RPM_BUILD_ROOT%{imagedir}/$config
206 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
207 elif [ $config = "odroid-n2" ]; then
208 install -d $RPM_BUILD_ROOT%{imagedir}/$config
209 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
211 install -d $RPM_BUILD_ROOT%{imagedir}/$config
212 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
217 rm -rf $RPM_BUILD_ROOT
220 %defattr(644,root,root,755)
221 %doc MAINTAINERS README
225 %files image-odroid-n2
226 %defattr(644,root,root,755)
227 %{imagedir}/odroid-n2
229 %files image-pinebook-pro
230 %defattr(644,root,root,755)
231 %{imagedir}/pinebook-pro-rk3399
234 %ifarch %{armv6} %{armv7}
235 %files image-raspberry-pi-2
236 %defattr(644,root,root,755)
241 %files image-raspberry-pi-zero
242 %defattr(644,root,root,755)
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/mkimage