]> git.pld-linux.org Git - packages/uboot.git/blame - uboot.spec
explicitly define target CC
[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
af8b691a 4Version: 2021.07
d3dd7cf0
JB
5Release: 1
6License: GPL v2
ac10ab20 7Group: Applications/System
436e906e 8Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
af8b691a 9# Source0-md5: 7afbe0ef070dc0e8e970c57a08e3f336
436e906e 10Patch0: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
af8b691a 11Patch1: %{name}-pbp_usb_hang.patch
436e906e
JP
12URL: https://www.denx.de/wiki/U-Boot
13%ifarch aarch64
14BuildRequires: arm-trusted-firmware-armv8
15%endif
16BuildRequires: bison
0aec4800 17BuildRequires: dtc
436e906e 18BuildRequires: flex
d1ec13af 19BuildRequires: openssl-devel
ac10ab20
ER
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
436e906e
JP
22%define common_configs tools-only
23
24%ifarch %{arm}
25%define arch_configs rpi_0_w rpi_2
26%else
27%ifarch aarch64
28%define arch_configs pinebook-pro-rk3399
29%endif
30%endif
31
32%define configs %{common_configs} %{?arch_configs}
33
34%define rk3399_configs pinebook-pro-rk3399
35
36%define imagedir %{_datadir}/uboot
37
ac10ab20
ER
38%description
39Das U-Boot (Universal Bootloader, German for "the submarine") is a
40boot loader for a number of different computer architectures,
41including PPC, ARM, AVR32, MIPS, x86, 68k, Nios, and MicroBlaze.
42
d3dd7cf0
JB
43%description -l pl.UTF-8
44Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
45bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
8ee1e894 46AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
d3dd7cf0 47
436e906e
JP
48%package image-pinebook-pro
49Summary: U-Boot firmware images for Pinebook Pro
d1ec13af 50Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
436e906e
JP
51Group: Applications/System
52
53%description image-pinebook-pro
54U-Boot firmware images for Pinebook Pro.
55
d1ec13af
JB
56%description image-pinebook-pro -l pl.UTF-8
57Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
58
436e906e
JP
59%package image-raspberry-pi-2
60Summary: U-Boot firmware image for Raspberry Pi 2
d1ec13af 61Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
436e906e
JP
62Group: Applications/System
63
64%description image-raspberry-pi-2
65U-Boot firmware image for Raspberry Pi 2.
66
d1ec13af
JB
67%description image-raspberry-pi-2 -l pl.UTF-8
68Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
69
436e906e
JP
70%package image-raspberry-pi-zero
71Summary: U-Boot firmware image for Raspberry Pi Zero
d1ec13af 72Summary(pl.UTF-8): Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
436e906e
JP
73Group: Applications/System
74
75%description image-raspberry-pi-zero
76U-Boot firmware image for Raspberry Pi Zero.
77
d1ec13af
JB
78%description image-raspberry-pi-zero -l pl.UTF-8
79Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
80
ac10ab20
ER
81%package mkimage
82Summary: Generate kernel image for U-Boot
d3dd7cf0 83Summary(pl.UTF-8): Generowanie obrazu jądra dla U-Boota
ac10ab20
ER
84Group: Applications/System
85
86%description mkimage
87This package contains the mkimage utility, which encapsulates a
d3dd7cf0
JB
88compressed "uImage" Linux kernel image with header information, CRC32
89checksum, etc., for use with the U-Boot bootloader.
ac10ab20
ER
90
91mkimage can also be used to create ramdisk images for use with U-Boot,
92either separated from the Linux kernel image, or combined into one
93file. mkimage encapsulates the images with a 64 byte header containing
94information about target architecture, operating system, image type,
95compression method, entry points, time stamp, CRC32 checksums, etc.
96
d3dd7cf0
JB
97%description mkimage -l pl.UTF-8
98Ten pakiet zawiera narzędzie mkimage, łączące skompresowany obraz
99jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
100wykorzystania przez bootloader U-Boot.
101
102mkimage może być używane także do tworzenia obrazów ramdysków do
436e906e
JP
103wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
104połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
d3dd7cf0
JB
105nagłówek zawierający informacje o architekturze docelowej, systemie
106operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
107czasie utworzenia, sumach kontrolnych CRC32 itp.
108
ac10ab20
ER
109%prep
110%setup -q -n u-boot-%{version}
c0fcbd76 111%ifarch %{arm} aarch64
436e906e 112%patch0 -p1
c0fcbd76
JP
113%endif
114%ifarch aarch64
115%patch1 -p1
116%endif
bd3a7c20 117
ac10ab20 118%build
436e906e
JP
119for config in %configs; do
120 if echo ' %rk3399_configs ' | grep -q " $config "; then
121 mkdir -p build/$config
122 cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
123 fi
124 %{__make} ${config}_defconfig \
c93c2ef8 125 CC="%{__cc}" \
436e906e
JP
126 HOSTCC="%{__cc}" \
127 STRIP=: \
128 HOSTCFLAGS="%{rpmcflags}" \
129 HOSTLDFLAGS="%{rpmldflags}" \
130 V=1 \
131 O=build/$config
132 %{__make} \
133 $(test "$config" = "tools-only" && echo tools-only) \
c93c2ef8 134 CC="%{__cc}" \
436e906e
JP
135 HOSTCC="%{__cc}" \
136 STRIP=: \
137 HOSTCFLAGS="%{rpmcflags}" \
138 HOSTLDFLAGS="%{rpmldflags}" \
139 V=1 \
140 O=build/$config
141done
ac10ab20
ER
142
143%install
144rm -rf $RPM_BUILD_ROOT
d1ec13af 145install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
c7c7eeb7 146
436e906e
JP
147for config in %configs; do
148 if [ "$config" = "tools-only" ]; then
149 install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
150 elif echo ' %rk3399_configs ' | grep -q " $config "; then
151 install -d $RPM_BUILD_ROOT%{imagedir}/$config
152 cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
153 else
154 install -d $RPM_BUILD_ROOT%{imagedir}/$config
155 cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
156 fi
157done
ac10ab20
ER
158
159%clean
160rm -rf $RPM_BUILD_ROOT
161
162%files
163%defattr(644,root,root,755)
bd3a7c20 164%doc MAINTAINERS README
5d765406 165%dir %{imagedir}
ac10ab20 166
436e906e
JP
167%ifarch aarch64
168%files image-pinebook-pro
169%defattr(644,root,root,755)
170%{imagedir}/pinebook-pro-rk3399
171%endif
172
173%ifarch %{arm}
174%files image-raspberry-pi-2
175%defattr(644,root,root,755)
176%{imagedir}/rpi_2
177
178%files image-raspberry-pi-zero
179%defattr(644,root,root,755)
180%{imagedir}/rpi_0_w
181%endif
182
ac10ab20
ER
183%files mkimage
184%defattr(644,root,root,755)
185%attr(755,root,root) %{_bindir}/mkimage
This page took 0.120793 seconds and 4 git commands to generate.