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