From ec7b12197d0491b9b3a846da4d76fc9a00397c9f Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Wed, 24 Nov 2021 11:33:16 +0900 Subject: [PATCH] packaging: add u-boot spec file to build on obs Add u-boot spec file to build on obs system. xu3 config file is used to build, but it's not used anywhere. Change-Id: Idc898fe52393f53c33b7f14cb5ad3d69d9a5b025 Signed-off-by: Jaehoon Chung --- packaging/u-boot.spec | 76 +++++++++++++++++++++++++++++++++++++++ packaging/u_boot.manifest | 5 +++ 2 files changed, 81 insertions(+) create mode 100644 packaging/u-boot.spec create mode 100644 packaging/u_boot.manifest diff --git a/packaging/u-boot.spec b/packaging/u-boot.spec new file mode 100644 index 0000000000..d5ebee172a --- /dev/null +++ b/packaging/u-boot.spec @@ -0,0 +1,76 @@ +Name: u-boot +Version: 2021.10 +Release: 0 +Summary: Das U-Boot - Tizen bootloader +Group: System/Kernel +License: GPL-2.0+ +ExclusiveArch: %{arm} +URL: https://source.denx.de/u-boot/u-boot.git +Source0: %{name}-%{version}.tar.bz2 +Source1001: u_boot.manifest + +BuildRequires: gcc >= 6.0 +BuildRequires: flex +BuildRequires: bison +BuildRequires: libopenssl1.1-devel + +%description +u-boot - Tizen bootloader for Embedded boards based on ARM processor + +#TODO: Describe rpm package information depending on board +%package -n u-boot-pkg +Summary: A bootloader for Embedded system +Group: System/Kernel + +%description -n u-boot-pkg +A boot loader for embedded systems. +Das U-Boot is a cross-platform bootloader for embedded systems, +used as the default boot loader by several board vendors. It is +intended to be easy to port and to debug, and runs on many +supported architectures, including PPC, ARM, MIPS, x86, m68k, NIOS, +and Microblaze. + +%prep +%setup -q -n u-boot-%{version} + +%build +%{?asan:/usr/bin/gcc-unforce-options} +cp %{SOURCE1001} . + +CONFIG=odroid-xu3_defconfig + +make mrproper + +# 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" +make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'` + +# Generate params.bin +./scripts/get_default_envs.sh > default_envs.txt +mkenvimage -s 16384 -o params.bin default_envs.txt +rm default_envs.txt + + +%install +rm -rf %{buildroot} + +# u-boot installation +mkdir -p %{buildroot}/var/tmp/u-boot-xu3 +install -d %{buildroot}/var/tmp/u-boot-xu3 +install -m 755 u-boot.bin %{buildroot}/var/tmp/u-boot-xu3 +install -m 755 params.bin %{buildroot}/var/tmp/u-boot-xu3 + +%clean + +%files +%manifest u_boot.manifest +%defattr(-,root,root,-) +/var/tmp/u-boot-xu3 diff --git a/packaging/u_boot.manifest b/packaging/u_boot.manifest new file mode 100644 index 0000000000..017d22d3af --- /dev/null +++ b/packaging/u_boot.manifest @@ -0,0 +1,5 @@ + + + + + -- 2.34.1