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