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: gnutls-devel
27 BuildRequires: libuuid-devel
28 BuildRequires: openssl-devel
29 BuildRequires: rpmbuild(macros) >= 2.007
31 BuildRequires: arm-trusted-firmware-armv8
33 BuildRequires: crossarm-gcc
34 BuildRequires: qemu-user
35 BuildConflicts: libfdt-devel
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define common_configs tools-only
42 %define arch_configs rpi_0_w rpi_2
45 %define arch_configs rpi_2
48 %define arch_configs odroid-n2 pinebook-pro-rk3399
51 %define configs %{common_configs} %{?arch_configs}
53 %define rk3399_configs pinebook-pro-rk3399
55 %define imagedir %{_datadir}/uboot
58 Das U-Boot (Universal Bootloader, German for "the submarine") is a
59 boot loader for a number of different computer architectures,
60 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
62 %description -l pl.UTF-8
63 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
64 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
65 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
67 %package image-odroid-n2
68 Summary: U-Boot firmware images for Odroid N2/N2+
69 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
70 Group: Applications/System
71 Requires: %{name} = %{version}-%{release}
73 %description image-odroid-n2
74 U-Boot firmware images for Odroid N2/N2+.
76 %description image-odroid-n2 -l pl.UTF-8
77 Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
79 %package image-pinebook-pro
80 Summary: U-Boot firmware images for Pinebook Pro
81 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
82 Group: Applications/System
83 Requires: %{name} = %{version}-%{release}
85 %description image-pinebook-pro
86 U-Boot firmware images for Pinebook Pro.
88 %description image-pinebook-pro -l pl.UTF-8
89 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
91 %package image-raspberry-pi-2
92 Summary: U-Boot firmware image for Raspberry Pi 2
93 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
94 Group: Applications/System
95 Requires: %{name} = %{version}-%{release}
97 %description image-raspberry-pi-2
98 U-Boot firmware image for Raspberry Pi 2.
100 %description image-raspberry-pi-2 -l pl.UTF-8
101 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
103 %package image-raspberry-pi-zero
104 Summary: U-Boot firmware image for Raspberry Pi Zero
105 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
106 Group: Applications/System
107 Requires: %{name} = %{version}-%{release}
109 %description image-raspberry-pi-zero
110 U-Boot firmware image for Raspberry Pi Zero.
112 %description image-raspberry-pi-zero -l pl.UTF-8
113 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
116 Summary: Generate kernel image for U-Boot
117 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
118 Group: Applications/System
121 This package contains the mkimage utility, which encapsulates a
122 compressed "uImage" Linux kernel image with header information, CRC32
123 checksum, etc., for use with the U-Boot bootloader.
125 mkimage can also be used to create ramdisk images for use with U-Boot,
126 either separated from the Linux kernel image, or combined into one
127 file. mkimage encapsulates the images with a 64 byte header containing
128 information about target architecture, operating system, image type,
129 compression method, entry points, time stamp, CRC32 checksums, etc.
131 %description mkimage -l pl.UTF-8
132 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
133 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
134 wykorzystania przez bootloader U-Boot.
136 mkimage może być używane także do tworzenia obrazów ramdysków do
137 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
138 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
139 nagłówek zawierający informacje o architekturze docelowej, systemie
140 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
141 czasie utworzenia, sumach kontrolnych CRC32 itp.
144 %setup -q -n u-boot-%{version}
145 %ifarch %{arm} aarch64
151 install -d build/hardkernel-uboot-odroid
152 tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
153 mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
154 cd build/hardkernel-uboot-odroid
166 for config in %configs; do
167 if echo ' %rk3399_configs ' | grep -q " $config "; then
168 mkdir -p build/$config
169 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
171 %{__make} ${config}_defconfig \
175 HOSTCFLAGS="%{rpmcflags}" \
176 HOSTLDFLAGS="%{rpmldflags}" \
180 $(test "$config" = "tools-only" && echo tools-only) \
184 HOSTCFLAGS="%{rpmcflags}" \
185 HOSTLDFLAGS="%{rpmldflags}" \
190 cd build/hardkernel-uboot-odroid
191 %{__make} odroidn2_defconfig \
195 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
196 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
197 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
198 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
207 for config in %configs; do
208 if [ "$config" = "tools-only" ]; then
209 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
210 elif echo ' %rk3399_configs ' | grep -q " $config "; then
211 install -d $RPM_BUILD_ROOT%{imagedir}/$config
212 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
213 elif [ $config = "odroid-n2" ]; then
214 install -d $RPM_BUILD_ROOT%{imagedir}/$config
215 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
217 install -d $RPM_BUILD_ROOT%{imagedir}/$config
218 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
223 rm -rf $RPM_BUILD_ROOT
226 %defattr(644,root,root,755)
227 %doc MAINTAINERS README
231 %files image-odroid-n2
232 %defattr(644,root,root,755)
233 %{imagedir}/odroid-n2
235 %files image-pinebook-pro
236 %defattr(644,root,root,755)
237 %{imagedir}/pinebook-pro-rk3399
240 %ifarch %{armv6} %{armv7}
241 %files image-raspberry-pi-2
242 %defattr(644,root,root,755)
247 %files image-raspberry-pi-zero
248 %defattr(644,root,root,755)
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_bindir}/mkimage