packaging: rpi4: add rpi4 64-bit spec file
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 5 Jun 2020 07:46:03 +0000 (16:46 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 04:19:21 +0000 (13:19 +0900)
Add rpi4 64-bit spec file.

Change-Id: I569df01d93a1d08de28f56f1ccbaf4a1600d79c0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
packaging/u-boot-rpi4.spec [new file with mode: 0644]

diff --git a/packaging/u-boot-rpi4.spec b/packaging/u-boot-rpi4.spec
new file mode 100644 (file)
index 0000000..23738b2
--- /dev/null
@@ -0,0 +1,71 @@
+Name: u-boot-rpi4
+Version: 2019.10
+Release: 0
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+ExclusiveArch: aarch64
+URL: http://git.denx.de/u-boot.git
+Source0: u-boot-%{version}.tar.bz2
+Source1001: u_boot_rpi4.manifest
+
+BuildRequires: gcc >= 6.0
+BuildRequires: flex
+BuildRequires: bison
+
+%description
+u-boot - Tizen bootloader for RPI4 boards based
+
+%prep
+%setup -q -n u-boot-%{version}
+
+%build
+%{?asan:/usr/bin/gcc-unforce-options}
+cp %{SOURCE1001} .
+
+CONFIG=rpi_4_defconfig
+
+make mrproper
+
+# Build dtc
+make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
+
+# Set configuration
+make $CONFIG
+
+# Build tools
+make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
+
+make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
+
+# Build u-boot
+export PATH="$PATH:tools:tools/dtc/"
+make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
+
+# Generate uboot.env
+cp `find ./env -name "built-in.o"` copy_env_common.o
+objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"`
+tr '\0' '\n' < copy_env_common.o > default_envs.txt
+mkenvimage -s 16384 -o uboot.env default_envs.txt
+rm copy_env_common.o default_envs.txt
+
+# Build boot.scr
+mkimage -A arm64 -T script -C none -n "Tizen RPI4 u-boot helper" -d ./board/raspberrypi/rpi/tizen-boot-rpi4.scr ./boot.scr.uimg
+
+%install
+rm -rf %{buildroot}
+
+# u-boot installation
+mkdir -p %{buildroot}/boot
+install -m 755 u-boot.bin %{buildroot}/boot/
+install -m 755 uboot.env %{buildroot}/boot/
+install -m 755 boot.scr.uimg %{buildroot}/boot/
+
+%clean
+
+%files
+%manifest u_boot_rpi4.manifest
+%defattr(-,root,root,-)
+/boot/u-boot.bin
+/boot/uboot.env
+/boot/boot.scr.uimg