]> git.pld-linux.org Git - packages/uboot.git/blob - uboot.spec
rebuild with openssl 3.0.0
[packages/uboot.git] / uboot.spec
1 Summary:        Das U-Boot -- the Universal Boot Loader
2 Summary(pl.UTF-8):      Das U-Boot - uniwersalny bootloader
3 Name:           uboot
4 Version:        2021.07
5 Release:        2
6 License:        GPL v2
7 Group:          Applications/System
8 Source0:        https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
9 # Source0-md5:  7afbe0ef070dc0e8e970c57a08e3f336
10 Patch0:         rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
11 Patch1:         %{name}-pbp_usb_hang.patch
12 URL:            https://www.denx.de/wiki/U-Boot
13 %ifarch aarch64
14 BuildRequires:  arm-trusted-firmware-armv8
15 %endif
16 BuildRequires:  bison
17 BuildRequires:  dtc
18 BuildRequires:  flex
19 BuildRequires:  openssl-devel
20 BuildRequires:  rpmbuild(macros) >= 2.007
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         common_configs  tools-only
24
25 %ifarch %{armv6}
26 %define         arch_configs    rpi_0_w rpi_2
27 %endif
28 %ifarch %{armv7}
29 %define         arch_configs    rpi_2
30 %endif
31 %ifarch aarch64
32 %define         arch_configs    pinebook-pro-rk3399
33 %endif
34
35 %define         configs %{common_configs} %{?arch_configs}
36
37 %define         rk3399_configs pinebook-pro-rk3399
38
39 %define         imagedir        %{_datadir}/uboot
40
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
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,
49 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
50
51 %package image-pinebook-pro
52 Summary:        U-Boot firmware images for Pinebook Pro
53 Summary(pl.UTF-8):      Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro
54 Group:          Applications/System
55
56 %description image-pinebook-pro
57 U-Boot firmware images for Pinebook Pro.
58
59 %description image-pinebook-pro -l pl.UTF-8
60 Obrazy firmware'u U-Boot dla urządzeń Pinebook Pro.
61
62 %package image-raspberry-pi-2
63 Summary:        U-Boot firmware image for Raspberry Pi 2
64 Summary(pl.UTF-8):      Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2
65 Group:          Applications/System
66
67 %description image-raspberry-pi-2
68 U-Boot firmware image for Raspberry Pi 2.
69
70 %description image-raspberry-pi-2 -l pl.UTF-8
71 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi 2.
72
73 %package image-raspberry-pi-zero
74 Summary:        U-Boot firmware image for Raspberry Pi Zero
75 Summary(pl.UTF-8):      Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero
76 Group:          Applications/System
77
78 %description image-raspberry-pi-zero
79 U-Boot firmware image for Raspberry Pi Zero.
80
81 %description image-raspberry-pi-zero -l pl.UTF-8
82 Obrazy firmware'u U-Boot dla urządzeń Raspberry Pi Zero.
83
84 %package mkimage
85 Summary:        Generate kernel image for U-Boot
86 Summary(pl.UTF-8):      Generowanie obrazu jądra dla U-Boota
87 Group:          Applications/System
88
89 %description mkimage
90 This package contains the mkimage utility, which encapsulates a
91 compressed "uImage" Linux kernel image with header information, CRC32
92 checksum, etc., for use with the U-Boot bootloader.
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
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
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
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
112 %prep
113 %setup -q -n u-boot-%{version}
114 %ifarch %{arm} aarch64
115 %patch0 -p1
116 %endif
117 %ifarch aarch64
118 %patch1 -p1
119 %endif
120
121 %build
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 \
128                 CC="%{__cc}" \
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) \
137                 CC="%{__cc}" \
138                 HOSTCC="%{__cc}" \
139                 STRIP=: \
140                 HOSTCFLAGS="%{rpmcflags}" \
141                 HOSTLDFLAGS="%{rpmldflags}" \
142                 V=1 \
143                 O=build/$config
144 done
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT{%{_bindir},%{imagedir}}
149
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
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %files
166 %defattr(644,root,root,755)
167 %doc MAINTAINERS README
168 %dir %{imagedir}
169
170 %ifarch aarch64
171 %files image-pinebook-pro
172 %defattr(644,root,root,755)
173 %{imagedir}/pinebook-pro-rk3399
174 %endif
175
176 %ifarch %{armv6} %{armv7}
177 %files image-raspberry-pi-2
178 %defattr(644,root,root,755)
179 %{imagedir}/rpi_2
180 %endif
181
182 %ifarch %{armv6}
183 %files image-raspberry-pi-zero
184 %defattr(644,root,root,755)
185 %{imagedir}/rpi_0_w
186 %endif
187
188 %files mkimage
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/mkimage
This page took 0.063061 seconds and 3 git commands to generate.