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