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: 2020.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: flex
14 BuildRequires: bison
15
16 %description
17 u-boot - Tizen bootloader for RPI3 boards based
18
19 %package -n u-boot-tools
20 Summary: Companion tools for Das U-Boot bootloader
21 Group: System/Kernel
22 Provides: dtc
23
24 %description -n u-boot-tools
25 This package includes the mkimage program, which allows generation of U-Boot
26 images in various formats, and the fw_printenv and fw_setenv programs to read
27 and modify U-Boot's environment.
28
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=rpi_3_32b_defconfig
38
39 make mrproper
40
41 # Build dtc
42 make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
43
44 # Set configuration
45 make $CONFIG
46
47 # Build tools
48 make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
49
50 make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
51
52 # Build u-boot
53 export PATH="$PATH:tools:tools/dtc/"
54 make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
55
56 # Generate uboot.env
57 cp `find ./env -name "built-in.o"` copy_env_common.o
58 objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"`
59 tr '\0' '\n' < copy_env_common.o > default_envs.txt
60 mkenvimage -s 16384 -o uboot.env default_envs.txt
61 rm copy_env_common.o default_envs.txt
62
63 # Build boot.scr
64 mkimage -A arm -T script -C none -n "Tizen RPI3 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi3.scr ./boot.scr.uimg
65
66 %install
67 rm -rf %{buildroot}
68
69 # Tools installation
70 mkdir -p %{buildroot}%{_bindir}
71 install -p -m 0755 tools/mkimage %{buildroot}%{_bindir}
72 install -p -m 0755 tools/env/fw_printenv %{buildroot}%{_bindir}
73 install -p -m 0755 tools/dtc/dtc %{buildroot}%{_bindir}
74 ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
75
76 # u-boot installation
77 mkdir -p %{buildroot}/boot
78 install -m 755 u-boot.bin %{buildroot}/boot/
79 install -m 755 uboot.env %{buildroot}/boot/
80 install -m 755 boot.scr.uimg %{buildroot}/boot/
81
82 %clean
83
84 %files
85 %manifest u_boot_rpi3.manifest
86 %defattr(-,root,root,-)
87 /boot/u-boot.bin
88 /boot/uboot.env
89 /boot/boot.scr.uimg
90
91 %files -n u-boot-tools
92 %manifest u_boot_rpi3.manifest
93 %defattr(-,root,root,-)
94 %{_bindir}/mkimage
95 %{_bindir}/fw_printenv
96 %{_bindir}/fw_setenv
97 %{_bindir}/dtc