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: f1392080facf59dd2c34096a5fd95d4c
10 Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
11 Patch1: %{name}-pbp_usb_hang.patch
12 Patch2: rk3399-emmc.patch
13 URL: https://www.denx.de/wiki/U-Boot
15 BuildRequires: arm-trusted-firmware-armv8
20 BuildRequires: openssl-devel
21 BuildRequires: rpmbuild(macros) >= 2.007
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define common_configs tools-only
27 %define arch_configs rpi_0_w rpi_2
30 %define arch_configs rpi_2
33 %define arch_configs pinebook-pro-rk3399
36 %define configs %{common_configs} %{?arch_configs}
38 %define rk3399_configs pinebook-pro-rk3399
40 %define imagedir %{_datadir}/uboot
43 Das U-Boot (Universal Bootloader, German for "the submarine") is a
44 boot loader for a number of different computer architectures,
45 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
47 %description -l pl.UTF-8
48 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
49 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
50 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
52 %package image-pinebook-pro
53 Summary: U-Boot firmware images for Pinebook Pro
54 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
55 Group: Applications/System
57 %description image-pinebook-pro
58 U-Boot firmware images for Pinebook Pro.
60 %description image-pinebook-pro -l pl.UTF-8
61 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
63 %package image-raspberry-pi-2
64 Summary: U-Boot firmware image for Raspberry Pi 2
65 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
66 Group: Applications/System
68 %description image-raspberry-pi-2
69 U-Boot firmware image for Raspberry Pi 2.
71 %description image-raspberry-pi-2 -l pl.UTF-8
72 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
74 %package image-raspberry-pi-zero
75 Summary: U-Boot firmware image for Raspberry Pi Zero
76 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
77 Group: Applications/System
79 %description image-raspberry-pi-zero
80 U-Boot firmware image for Raspberry Pi Zero.
82 %description image-raspberry-pi-zero -l pl.UTF-8
83 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
86 Summary: Generate kernel image for U-Boot
87 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
88 Group: Applications/System
91 This package contains the mkimage utility, which encapsulates a
92 compressed "uImage" Linux kernel image with header information, CRC32
93 checksum, etc., for use with the U-Boot bootloader.
95 mkimage can also be used to create ramdisk images for use with U-Boot,
96 either separated from the Linux kernel image, or combined into one
97 file. mkimage encapsulates the images with a 64 byte header containing
98 information about target architecture, operating system, image type,
99 compression method, entry points, time stamp, CRC32 checksums, etc.
101 %description mkimage -l pl.UTF-8
102 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
103 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
104 wykorzystania przez bootloader U-Boot.
106 mkimage może być używane także do tworzenia obrazów ramdysków do
107 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
108 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
109 nagłówek zawierający informacje o architekturze docelowej, systemie
110 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
111 czasie utworzenia, sumach kontrolnych CRC32 itp.
114 %setup -q -n u-boot-%{version}
115 %ifarch %{arm} aarch64
124 for config in %configs; do
125 if echo ' %rk3399_configs ' | grep -q " $config "; then
126 mkdir -p build/$config
127 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
129 %{__make} ${config}_defconfig \
133 HOSTCFLAGS="%{rpmcflags}" \
134 HOSTLDFLAGS="%{rpmldflags}" \
138 $(test "$config" = "tools-only" && echo tools-only) \
142 HOSTCFLAGS="%{rpmcflags}" \
143 HOSTLDFLAGS="%{rpmldflags}" \
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
152 for config in %configs; do
153 if [ "$config" = "tools-only" ]; then
154 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
155 elif echo ' %rk3399_configs ' | grep -q " $config "; then
156 install -d $RPM_BUILD_ROOT%{imagedir}/$config
157 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
159 install -d $RPM_BUILD_ROOT%{imagedir}/$config
160 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
165 rm -rf $RPM_BUILD_ROOT
168 %defattr(644,root,root,755)
169 %doc MAINTAINERS README
173 %files image-pinebook-pro
174 %defattr(644,root,root,755)
175 %{imagedir}/pinebook-pro-rk3399
178 %ifarch %{armv6} %{armv7}
179 %files image-raspberry-pi-2
180 %defattr(644,root,root,755)
185 %files image-raspberry-pi-zero
186 %defattr(644,root,root,755)
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/mkimage