Added packaging for GBS Compile 28/148028/6
authoregukim <egukim@dignsys.com>
Mon, 21 Aug 2017 12:38:03 +0000 (21:38 +0900)
committeregukim <egukim@dignsys.com>
Wed, 27 Sep 2017 05:22:17 +0000 (14:22 +0900)
this package create optee.bin, this package require tef_optee_os

Change-Id: I51ae2d51157d0bca02128561f17169bd42c4d0c3
Signed-off-by: egukim <egukim@dignsys.com>
packaging/arm-trusted-firmware.spec [new file with mode: 0644]

diff --git a/packaging/arm-trusted-firmware.spec b/packaging/arm-trusted-firmware.spec
new file mode 100644 (file)
index 0000000..2a4b838
--- /dev/null
@@ -0,0 +1,54 @@
+%define buildplat rpi3
+%define builddbg  1
+%if %{builddbg} == 1
+%define buildtype debug
+%define compile_flags BUILD_STRING="" LOG_LEVEL=40 DEBUG=1 V=0 CRASH_REPORTING=1 SPD=opteed
+%else
+%define buildtype release
+%define compile_flags BUILD_STRING="" LOG_LEVEL=20 DEBUG=0 V=0 CRASH_REPORTING=1 SPD=opteed
+%endif
+
+Name: atf-rpi3
+Summary: Trusted firmware for Embedded boards based on ARM processor
+Version: 2017.05
+Release: 0
+Group: Security/test
+License: BSD 3-Clause
+ExclusiveArch: aarch64
+URL: https://github.com/linaro-swg/arm-trusted-firmware.git
+Source0: %{name}-%{version}.tar.bz2
+
+BuildRequires: git
+BuildRequires: optee-os
+
+Provides: optee.bin
+
+%description
+Trusted firmware for Embedded boards based on ARM processor
+
+%prep
+%setup -q -n optee-os
+
+%build
+
+# Build image
+export CFLAGS="-O0 -gdwarf-2"
+make %{?_smp_mflags}  BL32=/boot/tee.bin %{compile_flags} PLAT=%{buildplat} all
+
+dd if=/dev/zero of=scratch bs=1c count=131072
+cat build/%{buildplat}/%{buildtype}/bl31.bin scratch > bl31.tmp
+dd if=bl31.tmp of=bl31.head bs=1c count=131072
+cat bl31.head /boot/tee-pager.bin > optee.bin
+
+rm scratch bl31.tmp bl31.head
+
+
+%install
+mkdir -p %{buildroot}/boot/spl
+install -m 644 optee.bin %{buildroot}/boot/spl/
+
+%clean
+
+%files
+%defattr(-,root,root,-)
+/boot/*