Build artik710 and rpi3 in one spec file. 30/162030/1
authorr.tyminski <r.tyminski@partner.samsung.com>
Tue, 28 Nov 2017 12:54:23 +0000 (13:54 +0100)
committerRafa? Tymi?ski <r.tyminski@partner.samsung.com>
Tue, 28 Nov 2017 13:23:38 +0000 (13:23 +0000)
Change spec file to be more generic.

Change-Id: Iefbf5668b25242a811f5e553cc79304ab95830b5

packaging/optee-os-rpi3.spec [deleted file]
packaging/optee-os.spec [new file with mode: 0644]

diff --git a/packaging/optee-os-rpi3.spec b/packaging/optee-os-rpi3.spec
deleted file mode 100644 (file)
index 85f1a49..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-%define buildplat rpi3
-%if "%{build_type}" == "DEBUG"
-%define log_env CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
-%else
-%define log_env CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0
-%endif
-%define compile_flags CROSS_COMPILE="" CROSS_COMPILE64="" PLATFORM=%{buildplat} CFLAGS=-lgcc_eh CFG_LIBUTEE_TUI=n %{log_env}
-%if %{__isa_bits} == 64
-%define compile_arch %{compile_flags} CFG_ARM64_core=y
-%else
-%define compile_arch %{compile_flags} CFG_WITH_VFP=n
-%endif
-%define out_dir out/arm-plat-%{buildplat}
-%define export_dir export-ta_arm%{__isa_bits}
-%define out_export_dir opt/optee/
-
-Name:       optee-os
-Summary:    OpTEE OS with userspace libraries and devkit for OpTEE OS.
-Version:    2.4.0
-Release:    1%{?dist}
-Group:      Security/Testing
-License:    BSD-2-Clause
-URL:        https://github.com/OP-TEE/optee_os
-Source0:    %{name}-%{version}.tar.gz
-ExclusiveArch: armv6l armv7hl armv7l aarch64
-
-Provides:   tee-pager.bin
-Provides:   tee.bin
-Provides:   optee-os-ta
-
-BuildRequires: make
-BuildRequires: python
-BuildRequires: openssl
-
-%description
-Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
-
-%files
-/boot/tee-pager.bin
-/boot/tee.bin
-
-%prep
-%setup -q
-
-%build
-make %{compile_arch}
-
-%install
-mkdir -p %{buildroot}/boot/
-mkdir -p %{buildroot}/%{out_export_dir}
-
-cp -p %{_builddir}/%{name}-%{version}/out/arm-plat-%{buildplat}/core/tee-pager.bin %{buildroot}/boot/
-cp -p %{_builddir}/%{name}-%{version}/out/arm-plat-%{buildplat}/core/tee.bin %{buildroot}/boot/
-cp -rf %{_builddir}/%{name}-%{version}/%{out_dir}/%{export_dir} %{buildroot}/%{out_export_dir}/
-
-%clean
-
-%package ta
-Summary:    OpTEE OS userspace libraries and devkit for OpTEE OS.
-Group:      Security/Testing
-
-%description ta
-Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
-
-%files ta
-/%{out_export_dir}/%{export_dir}
diff --git a/packaging/optee-os.spec b/packaging/optee-os.spec
new file mode 100644 (file)
index 0000000..7ebf7c2
--- /dev/null
@@ -0,0 +1,92 @@
+Name:       optee-os
+Summary:    OpTEE OS with userspace libraries and devkit for OpTEE OS.
+Version:    2.4.0
+Release:    1%{?dist}
+Group:      Security/Testing
+License:    BSD-2-Clause
+URL:        https://github.com/OP-TEE/optee_os
+Source0:    %{name}-%{version}.tar.gz
+ExclusiveArch: armv6l armv7hl armv7l aarch64
+
+Provides:   tee-pager.bin
+Provides:   tee.bin
+Provides:   optee-os-ta
+
+BuildRequires: make
+BuildRequires: python
+BuildRequires: openssl
+
+%description
+Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
+
+%package -n optee-os-rpi3
+Summary:    OPTEE trusted operation system.
+Group:      Security/Testing
+
+%description -n optee-os-rpi3
+Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
+
+%package ta
+Summary:    OpTEE OS userspace libraries and devkit for OpTEE OS.
+Group:      Security/Testing
+
+%description ta
+Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
+
+%package -n optee-os-artik710
+Summary:    OPTEE trusted operation system.
+Group:      Security/Testing
+
+%description -n optee-os-artik710
+Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
+
+%if "%{build_type}" == "DEBUG"
+%define log_env CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
+%else
+%define log_env CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0
+%endif
+
+%if %{__isa_bits} == 64
+%define compile_arch CFG_ARM64_core=y
+%else
+%define compile_arch CFG_WITH_VFP=n
+%endif
+
+%define compile_flags CROSS_COMPILE="" CROSS_COMPILE64=""  CFLAGS=-lgcc_eh CFG_LIBUTEE_TUI=n CFLAGS=-lgcc_eh CFG_LIBUTEE_TUI=n %{log_env} %{compile_arch}
+
+%define export_dir export-ta_arm%{__isa_bits}
+%define out_export_dir opt/optee/
+
+%prep
+%setup -q
+
+%build
+make %{compile_flags} PLATFORM=rpi3
+make %{compile_flags} PLATFORM=s5p6818 out/arm-plat-s5p6818/core/tee.bin
+
+%install
+%define buildplat rpi3
+%define plat_dir arm-plat-%{buildplat}
+mkdir -p %{buildroot}/boot/
+mkdir -p %{buildroot}/%{out_export_dir}
+
+cp -p out/%{plat_dir}/core/tee-pager.bin %{buildroot}/boot/
+cp -p out/%{plat_dir}/core/tee.bin %{buildroot}/boot/
+cp -rf out/%{plat_dir}/%{export_dir} %{buildroot}/%{out_export_dir}/
+
+%define buildplat s5p6818
+%define plat_dir arm-plat-%{buildplat}
+
+cp -p out/%{plat_dir}/core/tee.bin %{buildroot}/boot/tee-artik.bin
+
+%clean
+
+%files -n optee-os-rpi3
+/boot/tee-pager.bin
+/boot/tee.bin
+
+%files ta
+/%{out_export_dir}/%{export_dir}
+
+%files -n optee-os-artik710
+/boot/tee-artik.bin