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: 7afbe0ef070dc0e8e970c57a08e3f336
10 Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
11 Patch1: %{name}-pbp_usb_hang.patch
12 URL: https://www.denx.de/wiki/U-Boot
14 BuildRequires: arm-trusted-firmware-armv8
19 BuildRequires: openssl-devel
20 BuildRequires: rpmbuild(macros) >= 2.007
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define common_configs tools-only
26 %define arch_configs rpi_0_w rpi_2
29 %define arch_configs rpi_2
32 %define arch_configs pinebook-pro-rk3399
35 %define configs %{common_configs} %{?arch_configs}
37 %define rk3399_configs pinebook-pro-rk3399
39 %define imagedir %{_datadir}/uboot
42 Das U-Boot (Universal Bootloader, German for "the submarine") is a
43 boot loader for a number of different computer architectures,
44 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
46 %description -l pl.UTF-8
47 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
48 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
49 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
51 %package image-pinebook-pro
52 Summary: U-Boot firmware images for Pinebook Pro
53 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
54 Group: Applications/System
56 %description image-pinebook-pro
57 U-Boot firmware images for Pinebook Pro.
59 %description image-pinebook-pro -l pl.UTF-8
60 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
62 %package image-raspberry-pi-2
63 Summary: U-Boot firmware image for Raspberry Pi 2
64 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
65 Group: Applications/System
67 %description image-raspberry-pi-2
68 U-Boot firmware image for Raspberry Pi 2.
70 %description image-raspberry-pi-2 -l pl.UTF-8
71 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
73 %package image-raspberry-pi-zero
74 Summary: U-Boot firmware image for Raspberry Pi Zero
75 Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
76 Group: Applications/System
78 %description image-raspberry-pi-zero
79 U-Boot firmware image for Raspberry Pi Zero.
81 %description image-raspberry-pi-zero -l pl.UTF-8
82 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
85 Summary: Generate kernel image for U-Boot
86 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
87 Group: Applications/System
90 This package contains the mkimage utility, which encapsulates a
91 compressed "uImage" Linux kernel image with header information, CRC32
92 checksum, etc., for use with the U-Boot bootloader.
94 mkimage can also be used to create ramdisk images for use with U-Boot,
95 either separated from the Linux kernel image, or combined into one
96 file. mkimage encapsulates the images with a 64 byte header containing
97 information about target architecture, operating system, image type,
98 compression method, entry points, time stamp, CRC32 checksums, etc.
100 %description mkimage -l pl.UTF-8
101 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
102 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
103 wykorzystania przez bootloader U-Boot.
105 mkimage może być używane także do tworzenia obrazów ramdysków do
106 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
107 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
108 nagłówek zawierający informacje o architekturze docelowej, systemie
109 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
110 czasie utworzenia, sumach kontrolnych CRC32 itp.
113 %setup -q -n u-boot-%{version}
114 %ifarch %{arm} aarch64
122 for config in %configs; do
123 if echo ' %rk3399_configs ' | grep -q " $config "; then
124 mkdir -p build/$config
125 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
127 %{__make} ${config}_defconfig \
131 HOSTCFLAGS="%{rpmcflags}" \
132 HOSTLDFLAGS="%{rpmldflags}" \
136 $(test "$config" = "tools-only" && echo tools-only) \
140 HOSTCFLAGS="%{rpmcflags}" \
141 HOSTLDFLAGS="%{rpmldflags}" \
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
150 for config in %configs; do
151 if [ "$config" = "tools-only" ]; then
152 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
153 elif echo ' %rk3399_configs ' | grep -q " $config "; then
154 install -d $RPM_BUILD_ROOT%{imagedir}/$config
155 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
157 install -d $RPM_BUILD_ROOT%{imagedir}/$config
158 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
163 rm -rf $RPM_BUILD_ROOT
166 %defattr(644,root,root,755)
167 %doc MAINTAINERS README
171 %files image-pinebook-pro
172 %defattr(644,root,root,755)
173 %{imagedir}/pinebook-pro-rk3399
176 %ifarch %{armv6} %{armv7}
177 %files image-raspberry-pi-2
178 %defattr(644,root,root,755)
183 %files image-raspberry-pi-zero
184 %defattr(644,root,root,755)
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/mkimage