]> git.pld-linux.org Git - packages/uboot.git/blame - uboot.spec
python deps for binman
[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
6eb1aa11 5Release: 1
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}
436e906e 46%define arch_configs rpi_0_w rpi_2
9dd38447
JP
47%endif
48%ifarch %{armv7}
49%define arch_configs rpi_2
50%endif
436e906e 51%ifarch aarch64
b481b637 52%define arch_configs odroid-n2 pinebook-pro-rk3399
436e906e 53%endif
436e906e
JP
54
55%define configs %{common_configs} %{?arch_configs}
56
57%define rk3399_configs pinebook-pro-rk3399
58
59%define imagedir %{_datadir}/uboot
60
ac10ab20
ER
61%description
62Das U-Boot (Universal Bootloader, German for "the submarine") is a
63boot loader for a number of different computer architectures,
64including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
65
d3dd7cf0
JB
66%description -l pl.UTF-8
67Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
68bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
8ee1e894 69AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
d3dd7cf0 70
b481b637
JP
71%package image-odroid-n2
72Summary: U-Boot firmware images for Odroid N2/N2+
73Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+
74Group: Applications/System
c89ede0b 75Requires: %{name} = %{version}-%{release}
b481b637
JP
76
77%description image-odroid-n2
78U-Boot firmware images for Odroid N2/N2+.
79
80%description image-odroid-n2 -l pl.UTF-8
81Obrazy firmware'u U-Boot dla urządzeń Odroid N2/N2+.
82
436e906e
JP
83%package image-pinebook-pro
84Summary: U-Boot firmware images for Pinebook Pro
d1ec13af 85Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
436e906e 86Group: Applications/System
c89ede0b 87Requires: %{name} = %{version}-%{release}
436e906e
JP
88
89%description image-pinebook-pro
90U-Boot firmware images for Pinebook Pro.
91
d1ec13af
JB
92%description image-pinebook-pro -l pl.UTF-8
93Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
94
436e906e
JP
95%package image-raspberry-pi-2
96Summary: U-Boot firmware image for Raspberry Pi 2
d1ec13af 97Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
436e906e 98Group: Applications/System
c89ede0b 99Requires: %{name} = %{version}-%{release}
436e906e
JP
100
101%description image-raspberry-pi-2
102U-Boot firmware image for Raspberry Pi 2.
103
d1ec13af
JB
104%description image-raspberry-pi-2 -l pl.UTF-8
105Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
106
436e906e
JP
107%package image-raspberry-pi-zero
108Summary: U-Boot firmware image for Raspberry Pi Zero
d1ec13af 109Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
436e906e 110Group: Applications/System
c89ede0b 111Requires: %{name} = %{version}-%{release}
436e906e
JP
112
113%description image-raspberry-pi-zero
114U-Boot firmware image for Raspberry Pi Zero.
115
d1ec13af
JB
116%description image-raspberry-pi-zero -l pl.UTF-8
117Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
118
ac10ab20
ER
119%package mkimage
120Summary: Generate kernel image for U-Boot
d3dd7cf0 121Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
ac10ab20
ER
122Group: Applications/System
123
124%description mkimage
125This package contains the mkimage utility, which encapsulates a
d3dd7cf0
JB
126compressed "uImage" Linux kernel image with header information, CRC32
127checksum, etc., for use with the U-Boot bootloader.
ac10ab20
ER
128
129mkimage can also be used to create ramdisk images for use with U-Boot,
130either separated from the Linux kernel image, or combined into one
131file. mkimage encapsulates the images with a 64 byte header containing
132information about target architecture, operating system, image type,
133compression method, entry points, time stamp, CRC32 checksums, etc.
134
d3dd7cf0
JB
135%description mkimage -l pl.UTF-8
136Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
137jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
138wykorzystania przez bootloader U-Boot.
139
140mkimage może być używane także do tworzenia obrazów ramdysków do
436e906e
JP
141wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
142połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
d3dd7cf0
JB
143nagłówek zawierający informacje o architekturze docelowej, systemie
144operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
145czasie utworzenia, sumach kontrolnych CRC32 itp.
146
ac10ab20
ER
147%prep
148%setup -q -n u-boot-%{version}
c0fcbd76 149%ifarch %{arm} aarch64
436e906e 150%patch0 -p1
c0fcbd76
JP
151%endif
152%ifarch aarch64
b481b637
JP
153install -d build/hardkernel-uboot-odroid
154tar xf %{SOURCE1} -C build/hardkernel-uboot-odroid
155mv build/hardkernel-uboot-odroid/u-boot*/* build/hardkernel-uboot-odroid
156cd build/hardkernel-uboot-odroid
6929d579 157%patch2 -p1
b481b637
JP
158%patch3 -p1
159%patch4 -p1
160%patch5 -p1
161%patch6 -p1
162%patch7 -p1
163%patch8 -p1
164%patch9 -p1
165cd ../..
c0fcbd76 166%endif
bd3a7c20 167
ac10ab20 168%build
436e906e
JP
169for config in %configs; do
170 if echo ' %rk3399_configs ' | grep -q " $config "; then
171 mkdir -p build/$config
172 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
173 fi
174 %{__make} ${config}_defconfig \
c93c2ef8 175 CC="%{__cc}" \
436e906e
JP
176 HOSTCC="%{__cc}" \
177 STRIP=: \
178 HOSTCFLAGS="%{rpmcflags}" \
179 HOSTLDFLAGS="%{rpmldflags}" \
180 V=1 \
181 O=build/$config
182 %{__make} \
183 $(test "$config" = "tools-only" && echo tools-only) \
c93c2ef8 184 CC="%{__cc}" \
436e906e 185 HOSTCC="%{__cc}" \
6929d579 186 DTC=/usr/bin/dtc \
436e906e
JP
187 STRIP=: \
188 HOSTCFLAGS="%{rpmcflags}" \
189 HOSTLDFLAGS="%{rpmldflags}" \
190 V=1 \
6929d579
JP
191 O=build/$config \
192 BL31=bl31.elf
436e906e 193done
b481b637
JP
194%ifarch aarch64
195cd build/hardkernel-uboot-odroid
196%{__make} odroidn2_defconfig \
197 V=1
198%{__make} \
199 CROSS_COMPILE= \
200 ARM_CROSS_COMPILE=arm-linux-gnueabi- \
201 UBOOT_PAYLOAD=$(pwd)/../odroid-n2/u-boot.bin \
202 X86_64_DYNAMIC_WRAPPER=/usr/bin/box64 \
203 X86_64_STATIC_WRAPPER=/usr/bin/qemu-x86_64 \
204 V=1
205cd ../..
206%endif
ac10ab20
ER
207
208%install
209rm -rf $RPM_BUILD_ROOT
d1ec13af 210install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
c7c7eeb7 211
436e906e
JP
212for config in %configs; do
213 if [ "$config" = "tools-only" ]; then
214 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
215 elif echo ' %rk3399_configs ' | grep -q " $config "; then
216 install -d $RPM_BUILD_ROOT%{imagedir}/$config
217 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
b481b637
JP
218 elif [ $config = "odroid-n2" ]; then
219 install -d $RPM_BUILD_ROOT%{imagedir}/$config
220 cp -p build/hardkernel-uboot-odroid/sd_fuse/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
436e906e
JP
221 else
222 install -d $RPM_BUILD_ROOT%{imagedir}/$config
223 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
224 fi
225done
ac10ab20
ER
226
227%clean
228rm -rf $RPM_BUILD_ROOT
229
230%files
231%defattr(644,root,root,755)
bd3a7c20 232%doc MAINTAINERS README
5d765406 233%dir %{imagedir}
ac10ab20 234
436e906e 235%ifarch aarch64
b481b637
JP
236%files image-odroid-n2
237%defattr(644,root,root,755)
238%{imagedir}/odroid-n2
239
436e906e
JP
240%files image-pinebook-pro
241%defattr(644,root,root,755)
242%{imagedir}/pinebook-pro-rk3399
243%endif
244
9dd38447 245%ifarch %{armv6} %{armv7}
436e906e
JP
246%files image-raspberry-pi-2
247%defattr(644,root,root,755)
248%{imagedir}/rpi_2
9dd38447 249%endif
436e906e 250
9dd38447 251%ifarch %{armv6}
436e906e
JP
252%files image-raspberry-pi-zero
253%defattr(644,root,root,755)
254%{imagedir}/rpi_0_w
255%endif
256
ac10ab20
ER
257%files mkimage
258%defattr(644,root,root,755)
259%attr(755,root,root) %{_bindir}/mkimage
This page took 0.109846 seconds and 4 git commands to generate.