summaryrefslogtreecommitdiff
path: root/packaging/optee-os-rpi3.spec
blob: 85f1a49ce36d89951c7240228e50fa420eee6081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%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}