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