samsung: tizen_amlogic: increase ramdisk size from 8M to 32M
[platform/kernel/u-boot.git] / packaging / u-boot-rpi3-32b.spec
1 Name: u-boot-rpi3-32b
2 Version: 2021.10
3 Release: 0
4 Summary: Das U-Boot - Tizen bootloader
5 Group: System/Kernel
6 License: GPL-2.0+
7 ExclusiveArch: %{arm}
8 URL: https://source.denx.de/u-boot/u-boot.git
9 Source0: u-boot-%{version}.tar.bz2
10 Source1001: u_boot_rpi3.manifest
11
12 BuildRequires: gcc >= 6.0
13 BuildRequires: bc
14 BuildRequires: flex
15 BuildRequires: bison
16 BuildRequires: libopenssl1.1-devel
17
18 %description
19 u-boot - Tizen bootloader for RPI3 boards based
20
21 %package -n u-boot-tools
22 Summary: Companion tools for Das U-Boot bootloader
23 Group: System/Kernel
24
25 %description -n u-boot-tools
26 This package includes the mkimage program, which allows generation of U-Boot
27 images in various formats, and the fw_printenv and fw_setenv programs to read
28 and modify U-Boot's environment.
29
30
31 %prep
32 %setup -q -n u-boot-%{version}
33
34 %build
35 %{?asan:/usr/bin/gcc-unforce-options}
36 cp %{SOURCE1001} .
37
38 CONFIG=tizen_rpi_3_32b_defconfig
39
40 make mrproper
41
42 # Set configuration
43 make $CONFIG
44
45 # Build tools
46 make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
47
48 make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
49
50 # Build u-boot
51 export PATH="$PATH:tools"
52 make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
53
54 # Generate uboot.env
55 ./scripts/get_default_envs.sh > default_envs.txt
56 mkenvimage -s 16384 -o uboot.env default_envs.txt
57 rm default_envs.txt
58
59 # Build boot.scr
60 mkimage -A arm -T script -C none -n "Tizen RPI3 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi3.scr ./boot.scr.uimg
61
62 %install
63 rm -rf %{buildroot}
64
65 # Tools installation
66 mkdir -p %{buildroot}%{_bindir}
67 install -p -m 0755 tools/mkimage %{buildroot}%{_bindir}
68 install -p -m 0755 tools/env/fw_printenv %{buildroot}%{_bindir}
69 install -p -m 0755 scripts/dtc/dtc %{buildroot}%{_bindir}
70 ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
71
72 # u-boot installation
73 mkdir -p %{buildroot}/boot
74 install -m 755 u-boot.bin %{buildroot}/boot/
75 install -m 755 uboot.env %{buildroot}/boot/
76 install -m 755 boot.scr.uimg %{buildroot}/boot/
77
78 %clean
79
80 %files
81 %manifest u_boot_rpi3.manifest
82 %defattr(-,root,root,-)
83 /boot/u-boot.bin
84 /boot/uboot.env
85 /boot/boot.scr.uimg
86
87 %files -n u-boot-tools
88 %manifest u_boot_rpi3.manifest
89 %defattr(-,root,root,-)
90 %{_bindir}/mkimage
91 %{_bindir}/fw_printenv
92 %{_bindir}/fw_setenv
93 %{_bindir}/dtc