packaging: add u-boot spec file to build on obs submit/tizen/20211124.023912
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 24 Nov 2021 02:33:16 +0000 (11:33 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 24 Nov 2021 02:35:54 +0000 (11:35 +0900)
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 <jh80.chung@samsung.com>
packaging/u-boot.spec [new file with mode: 0644]
packaging/u_boot.manifest [new file with mode: 0644]

diff --git a/packaging/u-boot.spec b/packaging/u-boot.spec
new file mode 100644 (file)
index 0000000..d5ebee1
--- /dev/null
@@ -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 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>