configs: meson64: Remove the duplicated defined ENV_SETTING
[platform/kernel/u-boot.git] / packaging / u-boot-rpi4-32b.spec
1 Name: u-boot-rpi4-32b
2 Version: 2023.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_rpi4.manifest
11
12 BuildRequires: gcc >= 6.0
13 BuildRequires: bc
14 BuildRequires: flex
15 BuildRequires: bison
16 BuildRequires: pkgconfig(openssl3)
17
18 %description
19 u-boot - Tizen bootloader for RPI4 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 %prep
31 %setup -q -n u-boot-%{version}
32
33 %build
34 %{?asan:/usr/bin/gcc-unforce-options}
35 cp %{SOURCE1001} .
36
37 CONFIG=tizen_rpi_4_32b_defconfig
38
39 make mrproper
40
41 # Set configuration
42 make $CONFIG
43
44 # Build tools
45 make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
46
47 make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
48
49 # Build u-boot
50 export PATH="$PATH:tools"
51 make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
52
53 # Generate uboot.env
54 ./scripts/get_default_envs.sh > default_envs.txt
55 mkenvimage -s 16384 -o uboot.env default_envs.txt
56 rm default_envs.txt
57
58 # Build boot.scr
59 mkimage -A arm -T script -C none -n "Tizen RPI4 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi4.scr ./boot.scr.uimg
60
61 %install
62 rm -rf %{buildroot}
63
64 # Tools installation
65 mkdir -p %{buildroot}%{_bindir}
66 install -p -m 0755 tools/mkimage %{buildroot}%{_bindir}
67 install -p -m 0755 tools/env/fw_printenv %{buildroot}%{_bindir}
68 install -p -m 0755 scripts/dtc/dtc %{buildroot}%{_bindir}
69 ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
70
71 # u-boot installation
72 mkdir -p %{buildroot}/boot
73 install -m 755 u-boot.bin %{buildroot}/boot/
74 install -m 755 uboot.env %{buildroot}/boot/
75 install -m 755 boot.scr.uimg %{buildroot}/boot/
76
77 %clean
78
79 %files
80 %manifest u_boot_rpi4.manifest
81 %defattr(-,root,root,-)
82 /boot/u-boot.bin
83 /boot/uboot.env
84 /boot/boot.scr.uimg
85
86 %files -n u-boot-tools
87 %manifest u_boot_rpi4.manifest
88 %defattr(-,root,root,-)
89 %{_bindir}/mkimage
90 %{_bindir}/fw_printenv
91 %{_bindir}/fw_setenv
92 %{_bindir}/dtc