]> git.pld-linux.org Git - packages/uboot.git/blame - uboot.spec
add image for raspberry pi (arm64); rel 2
[packages/uboot.git] / uboot.spec
CommitLineData
ac10ab20 1Summary: Das U-Boot -- the Universal Boot Loader
d3dd7cf0 2Summary(pl.UTF-8): Das U-Boot - uniwersalny bootloader
ac10ab20 3Name: uboot
ca47733d 4Version: 2023.07.02
6408b123 5Release: 2
d3dd7cf0 6License: GPL v2
ac10ab20 7Group: Applications/System
436e906e 8Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
ca47733d 9# Source0-md5: 001a0c1ffedd9a6e8d7af915d4d68b02
b481b637
JP
10Source1: https://github.com/hardkernel/u-boot/archive/travis/odroidc4-189/odroid-189.tar.gz
11# Source1-md5: dd117b6180ad5c9abb3303b31e57e7b4
436e906e 12Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
6929d579 13Patch2: odroid-n2-binutils-2.39.patch
b481b637
JP
14Patch3: hardkernel-uboot-gcc5.patch
15Patch4: hardkernel-uboot-werror.patch
16Patch5: hardkernel-uboot-arm_cross.patch
17Patch6: hardkernel-uboot-no_stdint.patch
18Patch7: hardkernel-uboot-x86_64_bin.patch
19Patch8: hardkernel-uboot-acs.patch
20Patch9: hardkernel-uboot-uboot_payload.patch
436e906e 21URL: https://www.denx.de/wiki/U-Boot
436e906e 22BuildRequires: bison
0aec4800 23BuildRequires: dtc
436e906e 24BuildRequires: flex
d2474cd3
JP
25BuildRequires: gnutls-devel
26BuildRequires: libuuid-devel
d1ec13af 27BuildRequires: openssl-devel
f1257648 28BuildRequires: python3
6929d579
JP
29BuildRequires: python3-elftools
30BuildRequires: python3-libfdt
f1257648
JP
31BuildRequires: python3-modules
32BuildRequires: python3-setuptools
9dd38447 33BuildRequires: rpmbuild(macros) >= 2.007
b481b637
JP
34%ifarch aarch64
35BuildRequires: arm-trusted-firmware-armv8
36BuildRequires: box64
37BuildRequires: crossarm-gcc
38BuildRequires: qemu-user
39BuildConflicts: libfdt-devel
40%endif
ac10ab20
ER
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
436e906e
JP
43%define common_configs tools-only
44
9dd38447 45%ifarch %{armv6}
6b12d0a5 46%define arch_configs qemu_arm rpi_0_w rpi_2
9dd38447
JP
47%endif
48%ifarch %{armv7}
6b12d0a5 49%define arch_configs qemu_arm rpi_2
9dd38447 50%endif
436e906e 51%ifarch aarch64
6408b123 52%define arch_configs odroid-n2 pinebook-pro-rk3399 qemu_arm64 rpi_arm64
6b12d0a5
JP
53%endif
54%ifarch %{ix86}
4774a508 55%define arch_configs qemu-x86
6b12d0a5
JP
56%endif
57%ifarch %{x8664}
4774a508 58%define arch_configs qemu-x86_64
436e906e 59%endif
436e906e
JP
60
61%define configs %{common_configs} %{?arch_configs}
62
63%define rk3399_configs pinebook-pro-rk3399
64
65%define imagedir %{_datadir}/uboot
66
ac10ab20
ER
67%description
68Das U-Boot (Universal Bootloader, German for "the submarine") is a
69boot loader for a number of different computer architectures,
70including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
71
d3dd7cf0
JB
72%description -l pl.UTF-8
73Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
74bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
8ee1e894 75AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
d3dd7cf0 76
b481b637
JP
77%package image-odroid-n2
78Summary: U-Boot firmware images for Odroid N2/N2+
79Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
80Group: Applications/System
c89ede0b 81Requires: %{name} = %{version}-%{release}
b481b637
JP
82
83%description image-odroid-n2
84U-Boot firmware images for Odroid N2/N2+.
85
86%description image-odroid-n2 -l pl.UTF-8
87Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
88
436e906e
JP
89%package image-pinebook-pro
90Summary: U-Boot firmware images for Pinebook Pro
d1ec13af 91Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
436e906e 92Group: Applications/System
c89ede0b 93Requires: %{name} = %{version}-%{release}
436e906e
JP
94
95%description image-pinebook-pro
96U-Boot firmware images for Pinebook Pro.
97
d1ec13af
JB
98%description image-pinebook-pro -l pl.UTF-8
99Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
100
6b12d0a5
JP
101%package image-qemu
102Summary: U-Boot firmware images for QEMU
103Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla QEMU
104Group: Applications/System
105Requires: %{name} = %{version}-%{release}
106
107%description image-qemu
108U-Boot firmware images for QEMU.
109
110%description image-qemu -l pl.UTF-8
111Obrazy firmware'u U-Boot dla QEMU.
112
6408b123
JP
113%package image-raspberry-pi-arm64
114Summary: U-Boot firmware image for 64-bit Raspberry Pi boards
115Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla 64-bitowych urządzeń Raspberry Pi
116Group: Applications/System
117Requires: %{name} = %{version}-%{release}
118
119%description image-raspberry-pi-arm64
120U-Boot firmware image for 64-bit Raspberry Pi boards.
121
122%description image-raspberry-pi-arm64 -l pl.UTF-8
123Obrazy firmware'u U-Boot dla 64-bitowych urządzeń Raspberry Pi
124
436e906e
JP
125%package image-raspberry-pi-2
126Summary: U-Boot firmware image for Raspberry Pi 2
d1ec13af 127Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
436e906e 128Group: Applications/System
c89ede0b 129Requires: %{name} = %{version}-%{release}
436e906e
JP
130
131%description image-raspberry-pi-2
132U-Boot firmware image for Raspberry Pi 2.
133
d1ec13af
JB
134%description image-raspberry-pi-2 -l pl.UTF-8
135Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
136
436e906e
JP
137%package image-raspberry-pi-zero
138Summary: U-Boot firmware image for Raspberry Pi Zero
d1ec13af 139Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
436e906e 140Group: Applications/System
c89ede0b 141Requires: %{name} = %{version}-%{release}
436e906e
JP
142
143%description image-raspberry-pi-zero
144U-Boot firmware image for Raspberry Pi Zero.
145
d1ec13af
JB
146%description image-raspberry-pi-zero -l pl.UTF-8
147Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
148
ac10ab20
ER
149%package mkimage
150Summary: Generate kernel image for U-Boot
d3dd7cf0 151Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
ac10ab20
ER
152Group: Applications/System
153
154%description mkimage
155This package contains the mkimage utility, which encapsulates a
d3dd7cf0
JB
156compressed "uImage" Linux kernel image with header information, CRC32
157checksum, etc., for use with the U-Boot bootloader.
ac10ab20
ER
158
159mkimage can also be used to create ramdisk images for use with U-Boot,
160either separated from the Linux kernel image, or combined into one
161file. mkimage encapsulates the images with a 64 byte header containing
162information about target architecture, operating system, image type,
163compression method, entry points, time stamp, CRC32 checksums, etc.
164
d3dd7cf0
JB
165%description mkimage -l pl.UTF-8
166Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
167jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
168wykorzystania przez bootloader U-Boot.
169
170mkimage może być używane także do tworzenia obrazów ramdysków do
436e906e
JP
171wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
172połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
d3dd7cf0
JB
173nagłówek zawierający informacje o architekturze docelowej, systemie
174operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
175czasie utworzenia, sumach kontrolnych CRC32 itp.
176
ac10ab20
ER
177%prep
178%setup -q -n u-boot-%{version}
c0fcbd76 179%ifarch %{arm} aarch64
436e906e 180%patch0 -p1
c0fcbd76
JP
181%endif
182%ifarch aarch64
b481b637
JP
183install -d build/hardkernel-uboot-odroid
184tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
185mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
186cd build/hardkernel-uboot-odroid
6929d579 187%patch2 -p1
b481b637
JP
188%patch3 -p1
189%patch4 -p1
190%patch5 -p1
191%patch6 -p1
192%patch7 -p1
193%patch8 -p1
194%patch9 -p1
195cd ../..
c0fcbd76 196%endif
bd3a7c20 197
ac10ab20 198%build
436e906e
JP
199for config in %configs; do
200 if echo ' %rk3399_configs ' | grep -q " $config "; then
201 mkdir -p build/$config
202 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
203 fi
204 %{__make} ${config}_defconfig \
c93c2ef8 205 CC="%{__cc}" \
436e906e
JP
206 HOSTCC="%{__cc}" \
207 STRIP=: \
208 HOSTCFLAGS="%{rpmcflags}" \
209 HOSTLDFLAGS="%{rpmldflags}" \
210 V=1 \
211 O=build/$config
212 %{__make} \
213 $(test "$config" = "tools-only" && echo tools-only) \
c93c2ef8 214 CC="%{__cc}" \
436e906e 215 HOSTCC="%{__cc}" \
6929d579 216 DTC=/usr/bin/dtc \
436e906e
JP
217 STRIP=: \
218 HOSTCFLAGS="%{rpmcflags}" \
219 HOSTLDFLAGS="%{rpmldflags}" \
220 V=1 \
6929d579
JP
221 O=build/$config \
222 BL31=bl31.elf
436e906e 223done
b481b637
JP
224%ifarch aarch64
225cd build/hardkernel-uboot-odroid
226%{__make} odroidn2_defconfig \
227 V=1
228%{__make} \
229 CROSS_COMPILE= \
230 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
231 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
232 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
233 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
234 V=1
235cd ../..
236%endif
ac10ab20
ER
237
238%install
239rm -rf $RPM_BUILD_ROOT
d1ec13af 240install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
c7c7eeb7 241
436e906e
JP
242for config in %configs; do
243 if [ "$config" = "tools-only" ]; then
244 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
245 elif echo ' %rk3399_configs ' | grep -q " $config "; then
246 install -d $RPM_BUILD_ROOT%{imagedir}/$config
247 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
b481b637
JP
248 elif [ $config = "odroid-n2" ]; then
249 install -d $RPM_BUILD_ROOT%{imagedir}/$config
250 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
436e906e
JP
251 else
252 install -d $RPM_BUILD_ROOT%{imagedir}/$config
253 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
254 fi
255done
ac10ab20
ER
256
257%clean
258rm -rf $RPM_BUILD_ROOT
259
260%files
261%defattr(644,root,root,755)
bd3a7c20 262%doc MAINTAINERS README
5d765406 263%dir %{imagedir}
ac10ab20 264
436e906e 265%ifarch aarch64
b481b637
JP
266%files image-odroid-n2
267%defattr(644,root,root,755)
268%{imagedir}/odroid-n2
269
436e906e
JP
270%files image-pinebook-pro
271%defattr(644,root,root,755)
272%{imagedir}/pinebook-pro-rk3399
6b12d0a5
JP
273
274%files image-qemu
275%defattr(644,root,root,755)
276%{imagedir}/qemu_arm64
6408b123
JP
277
278%files image-raspberry-pi-arm64
279%defattr(644,root,root,755)
280%{imagedir}/rpi_arm64
436e906e
JP
281%endif
282
9dd38447 283%ifarch %{armv6} %{armv7}
6b12d0a5
JP
284%files image-qemu
285%defattr(644,root,root,755)
286%{imagedir}/qemu_arm
287
436e906e
JP
288%files image-raspberry-pi-2
289%defattr(644,root,root,755)
290%{imagedir}/rpi_2
9dd38447 291%endif
436e906e 292
9dd38447 293%ifarch %{armv6}
436e906e
JP
294%files image-raspberry-pi-zero
295%defattr(644,root,root,755)
296%{imagedir}/rpi_0_w
297%endif
298
6b12d0a5
JP
299%ifarch %{ix86}
300%files image-qemu
301%defattr(644,root,root,755)
934c5ed6 302%{imagedir}/qemu-x86
6b12d0a5
JP
303%endif
304
305%ifarch %{x8664}
306%files image-qemu
307%defattr(644,root,root,755)
934c5ed6 308%{imagedir}/qemu-x86_64
6b12d0a5
JP
309%endif
310
ac10ab20
ER
311%files mkimage
312%defattr(644,root,root,755)
313%attr(755,root,root) %{_bindir}/mkimage
This page took 0.400853 seconds and 4 git commands to generate.