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: 14656f08aa73a8dbbde2424fe78bbe3b
10 Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
11 URL: https://www.denx.de/wiki/U-Boot
13 BuildRequires: arm-trusted-firmware-armv8
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define common_configs tools-only
22 %define arch_configs rpi_0_w rpi_2
25 %define arch_configs pinebook-pro-rk3399
29 %define configs %{common_configs} %{?arch_configs}
31 %define rk3399_configs pinebook-pro-rk3399
33 %define imagedir %{_datadir}/uboot
36 Das U-Boot (Universal Bootloader, German for "the submarine") is a
37 boot loader for a number of different computer architectures,
38 including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
40 %description -l pl.UTF-8
41 Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
42 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
43 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
45 %package image-pinebook-pro
46 Summary: U-Boot firmware images for Pinebook Pro
47 Group: Applications/System
49 %description image-pinebook-pro
50 U-Boot firmware images for Pinebook Pro.
52 %package image-raspberry-pi-2
53 Summary: U-Boot firmware image for Raspberry Pi 2
54 Group: Applications/System
56 %description image-raspberry-pi-2
57 U-Boot firmware image for Raspberry Pi 2.
59 %package image-raspberry-pi-zero
60 Summary: U-Boot firmware image for Raspberry Pi Zero
61 Group: Applications/System
63 %description image-raspberry-pi-zero
64 U-Boot firmware image for Raspberry Pi Zero.
67 Summary: Generate kernel image for U-Boot
68 Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
69 Group: Applications/System
72 This package contains the mkimage utility, which encapsulates a
73 compressed "uImage" Linux kernel image with header information, CRC32
74 checksum, etc., for use with the U-Boot bootloader.
76 mkimage can also be used to create ramdisk images for use with U-Boot,
77 either separated from the Linux kernel image, or combined into one
78 file. mkimage encapsulates the images with a 64 byte header containing
79 information about target architecture, operating system, image type,
80 compression method, entry points, time stamp, CRC32 checksums, etc.
82 %description mkimage -l pl.UTF-8
83 Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
84 jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
85 wykorzystania przez bootloader U-Boot.
87 mkimage może być używane także do tworzenia obrazów ramdysków do
88 wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
89 połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
90 nagłówek zawierający informacje o architekturze docelowej, systemie
91 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
92 czasie utworzenia, sumach kontrolnych CRC32 itp.
95 %setup -q -n u-boot-%{version}
99 for config in %configs; do
100 if echo ' %rk3399_configs ' | grep -q " $config "; then
101 mkdir -p build/$config
102 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
104 %{__make} ${config}_defconfig \
107 HOSTCFLAGS="%{rpmcflags}" \
108 HOSTLDFLAGS="%{rpmldflags}" \
112 $(test "$config" = "tools-only" && echo tools-only) \
115 HOSTCFLAGS="%{rpmcflags}" \
116 HOSTLDFLAGS="%{rpmldflags}" \
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT%{_bindir}
125 for config in %configs; do
126 if [ "$config" = "tools-only" ]; then
127 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
128 elif echo ' %rk3399_configs ' | grep -q " $config "; then
129 install -d $RPM_BUILD_ROOT%{imagedir}/$config
130 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
132 install -d $RPM_BUILD_ROOT%{imagedir}/$config
133 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
138 rm -rf $RPM_BUILD_ROOT
141 %defattr(644,root,root,755)
142 %doc MAINTAINERS README
145 %files image-pinebook-pro
146 %defattr(644,root,root,755)
147 %{imagedir}/pinebook-pro-rk3399
151 %files image-raspberry-pi-2
152 %defattr(644,root,root,755)
155 %files image-raspberry-pi-zero
156 %defattr(644,root,root,755)
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_bindir}/mkimage