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: a5a70f6c723d2601da7ea93ae95642f9
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
69 Requires: %{name} = %{version}-%{release}
71 %description image-odroid-n2
72 U-Boot firmware images for Odroid N2/N2+.
74 %description image-odroid-n2 -l pl.UTF-8
75 Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
77 %package image-pinebook-pro
78 Summary: U-Boot firmware images for Pinebook Pro
79 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
80 Group: Applications/System
81 Requires: %{name} = %{version}-%{release}
83 %description image-pinebook-pro
84 U-Boot firmware images for Pinebook Pro.
86 %description image-pinebook-pro -l pl.UTF-8
87 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
89 %package image-raspberry-pi-2
90 Summary: U-Boot firmware image for Raspberry Pi 2
91 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
92 Group: Applications/System
93 Requires: %{name} = %{version}-%{release}
95 %description image-raspberry-pi-2
96 U-Boot firmware image for Raspberry Pi 2.
98 %description image-raspberry-pi-2 -l pl.UTF-8
99 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
101 %package image-raspberry-pi-zero
102 Summary: U-Boot firmware image for Raspberry Pi Zero
103 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
104 Group: Applications/System
105 Requires: %{name} = %{version}-%{release}
107 %description image-raspberry-pi-zero
108 U-Boot firmware image for Raspberry Pi Zero.
110 %description image-raspberry-pi-zero -l pl.UTF-8
111 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
114 Summary: Generate kernel image for U-Boot
115 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
116 Group: Applications/System
119 This package contains the mkimage utility, which encapsulates a
120 compressed "uImage" Linux kernel image with header information, CRC32
121 checksum, etc., for use with the U-Boot bootloader.
123 mkimage can also be used to create ramdisk images for use with U-Boot,
124 either separated from the Linux kernel image, or combined into one
125 file. mkimage encapsulates the images with a 64 byte header containing
126 information about target architecture, operating system, image type,
127 compression method, entry points, time stamp, CRC32 checksums, etc.
129 %description mkimage -l pl.UTF-8
130 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
131 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
132 wykorzystania przez bootloader U-Boot.
134 mkimage może być używane także do tworzenia obrazów ramdysków do
135 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
136 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
137 nagłówek zawierający informacje o architekturze docelowej, systemie
138 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
139 czasie utworzenia, sumach kontrolnych CRC32 itp.
142 %setup -q -n u-boot-%{version}
143 %ifarch %{arm} aarch64
149 install -d build/hardkernel-uboot-odroid
150 tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
151 mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
152 cd build/hardkernel-uboot-odroid
164 for config in %configs; do
165 if echo ' %rk3399_configs ' | grep -q " $config "; then
166 mkdir -p build/$config
167 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
169 %{__make} ${config}_defconfig \
173 HOSTCFLAGS="%{rpmcflags}" \
174 HOSTLDFLAGS="%{rpmldflags}" \
178 $(test "$config" = "tools-only" && echo tools-only) \
182 HOSTCFLAGS="%{rpmcflags}" \
183 HOSTLDFLAGS="%{rpmldflags}" \
188 cd build/hardkernel-uboot-odroid
189 %{__make} odroidn2_defconfig \
193 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
194 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
195 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
196 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
202 rm -rf $RPM_BUILD_ROOT
203 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
205 for config in %configs; do
206 if [ "$config" = "tools-only" ]; then
207 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
208 elif echo ' %rk3399_configs ' | grep -q " $config "; then
209 install -d $RPM_BUILD_ROOT%{imagedir}/$config
210 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
211 elif [ $config = "odroid-n2" ]; then
212 install -d $RPM_BUILD_ROOT%{imagedir}/$config
213 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
215 install -d $RPM_BUILD_ROOT%{imagedir}/$config
216 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
221 rm -rf $RPM_BUILD_ROOT
224 %defattr(644,root,root,755)
225 %doc MAINTAINERS README
229 %files image-odroid-n2
230 %defattr(644,root,root,755)
231 %{imagedir}/odroid-n2
233 %files image-pinebook-pro
234 %defattr(644,root,root,755)
235 %{imagedir}/pinebook-pro-rk3399
238 %ifarch %{armv6} %{armv7}
239 %files image-raspberry-pi-2
240 %defattr(644,root,root,755)
245 %files image-raspberry-pi-zero
246 %defattr(644,root,root,755)
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/mkimage