]> git.pld-linux.org Git - packages/uboot.git/blame - uboot.spec
correct config name for qemu on x86*
[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
6929d579 4Version: 2023.04
6b12d0a5 5Release: 2
d3dd7cf0 6License: GPL v2
ac10ab20 7Group: Applications/System
436e906e 8Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
6929d579 9# Source0-md5: b90cb4a3b8f02f18872197b052222d19
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
6b12d0a5
JP
52%define arch_configs odroid-n2 pinebook-pro-rk3399 qemu_arm64
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
436e906e
JP
113%package image-raspberry-pi-2
114Summary: U-Boot firmware image for Raspberry Pi 2
d1ec13af 115Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
436e906e 116Group: Applications/System
c89ede0b 117Requires: %{name} = %{version}-%{release}
436e906e
JP
118
119%description image-raspberry-pi-2
120U-Boot firmware image for Raspberry Pi 2.
121
d1ec13af
JB
122%description image-raspberry-pi-2 -l pl.UTF-8
123Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
124
436e906e
JP
125%package image-raspberry-pi-zero
126Summary: U-Boot firmware image for Raspberry Pi Zero
d1ec13af 127Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
436e906e 128Group: Applications/System
c89ede0b 129Requires: %{name} = %{version}-%{release}
436e906e
JP
130
131%description image-raspberry-pi-zero
132U-Boot firmware image for Raspberry Pi Zero.
133
d1ec13af
JB
134%description image-raspberry-pi-zero -l pl.UTF-8
135Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
136
ac10ab20
ER
137%package mkimage
138Summary: Generate kernel image for U-Boot
d3dd7cf0 139Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
ac10ab20
ER
140Group: Applications/System
141
142%description mkimage
143This package contains the mkimage utility, which encapsulates a
d3dd7cf0
JB
144compressed "uImage" Linux kernel image with header information, CRC32
145checksum, etc., for use with the U-Boot bootloader.
ac10ab20
ER
146
147mkimage can also be used to create ramdisk images for use with U-Boot,
148either separated from the Linux kernel image, or combined into one
149file. mkimage encapsulates the images with a 64 byte header containing
150information about target architecture, operating system, image type,
151compression method, entry points, time stamp, CRC32 checksums, etc.
152
d3dd7cf0
JB
153%description mkimage -l pl.UTF-8
154Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
155jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
156wykorzystania przez bootloader U-Boot.
157
158mkimage może być używane także do tworzenia obrazów ramdysków do
436e906e
JP
159wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
160połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
d3dd7cf0
JB
161nagłówek zawierający informacje o architekturze docelowej, systemie
162operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
163czasie utworzenia, sumach kontrolnych CRC32 itp.
164
ac10ab20
ER
165%prep
166%setup -q -n u-boot-%{version}
c0fcbd76 167%ifarch %{arm} aarch64
436e906e 168%patch0 -p1
c0fcbd76
JP
169%endif
170%ifarch aarch64
b481b637
JP
171install -d build/hardkernel-uboot-odroid
172tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
173mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
174cd build/hardkernel-uboot-odroid
6929d579 175%patch2 -p1
b481b637
JP
176%patch3 -p1
177%patch4 -p1
178%patch5 -p1
179%patch6 -p1
180%patch7 -p1
181%patch8 -p1
182%patch9 -p1
183cd ../..
c0fcbd76 184%endif
bd3a7c20 185
ac10ab20 186%build
436e906e
JP
187for config in %configs; do
188 if echo ' %rk3399_configs ' | grep -q " $config "; then
189 mkdir -p build/$config
190 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
191 fi
192 %{__make} ${config}_defconfig \
c93c2ef8 193 CC="%{__cc}" \
436e906e
JP
194 HOSTCC="%{__cc}" \
195 STRIP=: \
196 HOSTCFLAGS="%{rpmcflags}" \
197 HOSTLDFLAGS="%{rpmldflags}" \
198 V=1 \
199 O=build/$config
200 %{__make} \
201 $(test "$config" = "tools-only" && echo tools-only) \
c93c2ef8 202 CC="%{__cc}" \
436e906e 203 HOSTCC="%{__cc}" \
6929d579 204 DTC=/usr/bin/dtc \
436e906e
JP
205 STRIP=: \
206 HOSTCFLAGS="%{rpmcflags}" \
207 HOSTLDFLAGS="%{rpmldflags}" \
208 V=1 \
6929d579
JP
209 O=build/$config \
210 BL31=bl31.elf
436e906e 211done
b481b637
JP
212%ifarch aarch64
213cd build/hardkernel-uboot-odroid
214%{__make} odroidn2_defconfig \
215 V=1
216%{__make} \
217 CROSS_COMPILE= \
218 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
219 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
220 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
221 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
222 V=1
223cd ../..
224%endif
ac10ab20
ER
225
226%install
227rm -rf $RPM_BUILD_ROOT
d1ec13af 228install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
c7c7eeb7 229
436e906e
JP
230for config in %configs; do
231 if [ "$config" = "tools-only" ]; then
232 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
233 elif echo ' %rk3399_configs ' | grep -q " $config "; then
234 install -d $RPM_BUILD_ROOT%{imagedir}/$config
235 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
b481b637
JP
236 elif [ $config = "odroid-n2" ]; then
237 install -d $RPM_BUILD_ROOT%{imagedir}/$config
238 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
436e906e
JP
239 else
240 install -d $RPM_BUILD_ROOT%{imagedir}/$config
241 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
242 fi
243done
ac10ab20
ER
244
245%clean
246rm -rf $RPM_BUILD_ROOT
247
248%files
249%defattr(644,root,root,755)
bd3a7c20 250%doc MAINTAINERS README
5d765406 251%dir %{imagedir}
ac10ab20 252
436e906e 253%ifarch aarch64
b481b637
JP
254%files image-odroid-n2
255%defattr(644,root,root,755)
256%{imagedir}/odroid-n2
257
436e906e
JP
258%files image-pinebook-pro
259%defattr(644,root,root,755)
260%{imagedir}/pinebook-pro-rk3399
6b12d0a5
JP
261
262%files image-qemu
263%defattr(644,root,root,755)
264%{imagedir}/qemu_arm64
436e906e
JP
265%endif
266
9dd38447 267%ifarch %{armv6} %{armv7}
6b12d0a5
JP
268%files image-qemu
269%defattr(644,root,root,755)
270%{imagedir}/qemu_arm
271
436e906e
JP
272%files image-raspberry-pi-2
273%defattr(644,root,root,755)
274%{imagedir}/rpi_2
9dd38447 275%endif
436e906e 276
9dd38447 277%ifarch %{armv6}
436e906e
JP
278%files image-raspberry-pi-zero
279%defattr(644,root,root,755)
280%{imagedir}/rpi_0_w
281%endif
282
6b12d0a5
JP
283%ifarch %{ix86}
284%files image-qemu
285%defattr(644,root,root,755)
286%{imagedir}/qemu_x86
287%endif
288
289%ifarch %{x8664}
290%files image-qemu
291%defattr(644,root,root,755)
292%{imagedir}/qemu_x86_64
293%endif
294
ac10ab20
ER
295%files mkimage
296%defattr(644,root,root,755)
297%attr(755,root,root) %{_bindir}/mkimage
This page took 0.338486 seconds and 4 git commands to generate.