]>
Commit | Line | Data |
---|---|---|
ac10ab20 | 1 | Summary: Das U-Boot -- the Universal Boot Loader |
d3dd7cf0 | 2 | Summary(pl.UTF-8): Das U-Boot - uniwersalny bootloader |
ac10ab20 | 3 | Name: uboot |
af8b691a | 4 | Version: 2021.07 |
5652dd77 | 5 | Release: 2 |
d3dd7cf0 | 6 | License: GPL v2 |
ac10ab20 | 7 | Group: Applications/System |
436e906e | 8 | Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2 |
af8b691a | 9 | # Source0-md5: 7afbe0ef070dc0e8e970c57a08e3f336 |
436e906e | 10 | Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch |
af8b691a | 11 | Patch1: %{name}-pbp_usb_hang.patch |
436e906e JP |
12 | URL: https://www.denx.de/wiki/U-Boot |
13 | %ifarch aarch64 | |
14 | BuildRequires: arm-trusted-firmware-armv8 | |
15 | %endif | |
16 | BuildRequires: bison | |
0aec4800 | 17 | BuildRequires: dtc |
436e906e | 18 | BuildRequires: flex |
d1ec13af | 19 | BuildRequires: openssl-devel |
9dd38447 | 20 | BuildRequires: rpmbuild(macros) >= 2.007 |
ac10ab20 ER |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
436e906e JP |
23 | %define common_configs tools-only |
24 | ||
9dd38447 | 25 | %ifarch %{armv6} |
436e906e | 26 | %define arch_configs rpi_0_w rpi_2 |
9dd38447 JP |
27 | %endif |
28 | %ifarch %{armv7} | |
29 | %define arch_configs rpi_2 | |
30 | %endif | |
436e906e JP |
31 | %ifarch aarch64 |
32 | %define arch_configs pinebook-pro-rk3399 | |
33 | %endif | |
436e906e JP |
34 | |
35 | %define configs %{common_configs} %{?arch_configs} | |
36 | ||
37 | %define rk3399_configs pinebook-pro-rk3399 | |
38 | ||
39 | %define imagedir %{_datadir}/uboot | |
40 | ||
ac10ab20 ER |
41 | %description |
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. | |
45 | ||
d3dd7cf0 JB |
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, | |
8ee1e894 | 49 | AVR32, MIPS, x86, 68k, Nios i MicroBlaze. |
d3dd7cf0 | 50 | |
436e906e JP |
51 | %package image-pinebook-pro |
52 | Summary: U-Boot firmware images for Pinebook Pro | |
d1ec13af | 53 | Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro |
436e906e JP |
54 | Group: Applications/System |
55 | ||
56 | %description image-pinebook-pro | |
57 | U-Boot firmware images for Pinebook Pro. | |
58 | ||
d1ec13af JB |
59 | %description image-pinebook-pro -l pl.UTF-8 |
60 | Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro. | |
61 | ||
436e906e JP |
62 | %package image-raspberry-pi-2 |
63 | Summary: U-Boot firmware image for Raspberry Pi 2 | |
d1ec13af | 64 | Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2 |
436e906e JP |
65 | Group: Applications/System |
66 | ||
67 | %description image-raspberry-pi-2 | |
68 | U-Boot firmware image for Raspberry Pi 2. | |
69 | ||
d1ec13af JB |
70 | %description image-raspberry-pi-2 -l pl.UTF-8 |
71 | Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2. | |
72 | ||
436e906e JP |
73 | %package image-raspberry-pi-zero |
74 | Summary: U-Boot firmware image for Raspberry Pi Zero | |
d1ec13af | 75 | Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero |
436e906e JP |
76 | Group: Applications/System |
77 | ||
78 | %description image-raspberry-pi-zero | |
79 | U-Boot firmware image for Raspberry Pi Zero. | |
80 | ||
d1ec13af JB |
81 | %description image-raspberry-pi-zero -l pl.UTF-8 |
82 | Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero. | |
83 | ||
ac10ab20 ER |
84 | %package mkimage |
85 | Summary: Generate kernel image for U-Boot | |
d3dd7cf0 | 86 | Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota |
ac10ab20 ER |
87 | Group: Applications/System |
88 | ||
89 | %description mkimage | |
90 | This package contains the mkimage utility, which encapsulates a | |
d3dd7cf0 JB |
91 | compressed "uImage" Linux kernel image with header information, CRC32 |
92 | checksum, etc., for use with the U-Boot bootloader. | |
ac10ab20 ER |
93 | |
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. | |
99 | ||
d3dd7cf0 JB |
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. | |
104 | ||
105 | mkimage może być używane także do tworzenia obrazów ramdysków do | |
436e906e JP |
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 | |
d3dd7cf0 JB |
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. | |
111 | ||
ac10ab20 ER |
112 | %prep |
113 | %setup -q -n u-boot-%{version} | |
c0fcbd76 | 114 | %ifarch %{arm} aarch64 |
436e906e | 115 | %patch0 -p1 |
c0fcbd76 JP |
116 | %endif |
117 | %ifarch aarch64 | |
118 | %patch1 -p1 | |
119 | %endif | |
bd3a7c20 | 120 | |
ac10ab20 | 121 | %build |
436e906e JP |
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 | |
126 | fi | |
127 | %{__make} ${config}_defconfig \ | |
c93c2ef8 | 128 | CC="%{__cc}" \ |
436e906e JP |
129 | HOSTCC="%{__cc}" \ |
130 | STRIP=: \ | |
131 | HOSTCFLAGS="%{rpmcflags}" \ | |
132 | HOSTLDFLAGS="%{rpmldflags}" \ | |
133 | V=1 \ | |
134 | O=build/$config | |
135 | %{__make} \ | |
136 | $(test "$config" = "tools-only" && echo tools-only) \ | |
c93c2ef8 | 137 | CC="%{__cc}" \ |
436e906e JP |
138 | HOSTCC="%{__cc}" \ |
139 | STRIP=: \ | |
140 | HOSTCFLAGS="%{rpmcflags}" \ | |
141 | HOSTLDFLAGS="%{rpmldflags}" \ | |
142 | V=1 \ | |
143 | O=build/$config | |
144 | done | |
ac10ab20 ER |
145 | |
146 | %install | |
147 | rm -rf $RPM_BUILD_ROOT | |
d1ec13af | 148 | install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}} |
c7c7eeb7 | 149 | |
436e906e JP |
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 | |
156 | else | |
157 | install -d $RPM_BUILD_ROOT%{imagedir}/$config | |
158 | cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config | |
159 | fi | |
160 | done | |
ac10ab20 ER |
161 | |
162 | %clean | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
165 | %files | |
166 | %defattr(644,root,root,755) | |
bd3a7c20 | 167 | %doc MAINTAINERS README |
5d765406 | 168 | %dir %{imagedir} |
ac10ab20 | 169 | |
436e906e JP |
170 | %ifarch aarch64 |
171 | %files image-pinebook-pro | |
172 | %defattr(644,root,root,755) | |
173 | %{imagedir}/pinebook-pro-rk3399 | |
174 | %endif | |
175 | ||
9dd38447 | 176 | %ifarch %{armv6} %{armv7} |
436e906e JP |
177 | %files image-raspberry-pi-2 |
178 | %defattr(644,root,root,755) | |
179 | %{imagedir}/rpi_2 | |
9dd38447 | 180 | %endif |
436e906e | 181 | |
9dd38447 | 182 | %ifarch %{armv6} |
436e906e JP |
183 | %files image-raspberry-pi-zero |
184 | %defattr(644,root,root,755) | |
185 | %{imagedir}/rpi_0_w | |
186 | %endif | |
187 | ||
ac10ab20 ER |
188 | %files mkimage |
189 | %defattr(644,root,root,755) | |
190 | %attr(755,root,root) %{_bindir}/mkimage |