Disable building repository with ASan extra packs.
[platform/core/security/tef-optee_os.git] / packaging / optee-os.spec
1 Name:       optee-os
2 Summary:    OpTEE OS with userspace libraries and devkit for OpTEE OS.
3 Version:    2.4.0
4 Release:    1%{?dist}
5 Group:      Security/Testing
6 License:    BSD and zlib
7 URL:        https://github.com/OP-TEE/optee_os
8 Source0:    %{name}-%{version}.tar.gz
9 ExclusiveArch: armv6l armv7hl armv7l aarch64
10
11 Provides:   tee-pager.bin
12 Provides:   tee.bin
13 Provides:   optee-os-ta
14
15 BuildRequires: make
16 BuildRequires: python
17 BuildRequires: openssl
18
19 %description
20 Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
21
22 %package -n optee-os-rpi3
23 Summary:    OPTEE trusted operation system.
24 Group:      Security/Testing
25
26 %description -n optee-os-rpi3
27 Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
28
29 %package ta
30 Summary:    OpTEE OS userspace libraries and devkit for OpTEE OS.
31 Group:      Security/Testing
32
33 %description ta
34 Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
35
36 %package -n optee-os-artik710
37 Summary:    OPTEE trusted operation system.
38 Group:      Security/Testing
39
40 %description -n optee-os-artik710
41 Trusted execution enviroment in Linux using the ARM® TrustZone® technology.
42
43 %if "%{build_type}" == "DEBUG"
44 %define log_env CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
45 %else
46 %define log_env CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0
47 %endif
48
49 %if %{__isa_bits} == 64
50 %define compile_arch CFG_ARM64_core=y
51 %else
52 %define compile_arch CFG_WITH_VFP=n
53 %endif
54
55 %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}
56
57 %define export_dir export-ta_arm%{__isa_bits}
58 %define out_export_dir opt/optee/
59
60 %prep
61 %setup -q
62
63 %build
64 %{?asan:/usr/bin/gcc-unforce-options}
65 make %{compile_flags} PLATFORM=rpi3
66 make %{compile_flags} PLATFORM=s5p6818 out/arm-plat-s5p6818/core/tee.bin
67
68 %install
69 cp lib/libutils/isoc/arch/arm/softfloat/COPYING.txt LICENSE.BSD-3-Clause.mod
70
71 %define buildplat rpi3
72 %define plat_dir arm-plat-%{buildplat}
73 mkdir -p %{buildroot}/boot/
74 mkdir -p %{buildroot}/%{out_export_dir}
75
76 cp -p out/%{plat_dir}/core/tee-pager.bin %{buildroot}/boot/
77 cp -p out/%{plat_dir}/core/tee.bin %{buildroot}/boot/
78 cp -rf out/%{plat_dir}/%{export_dir} %{buildroot}/%{out_export_dir}/
79
80 %define buildplat s5p6818
81 %define plat_dir arm-plat-%{buildplat}
82
83 cp -p out/%{plat_dir}/core/tee.bin %{buildroot}/boot/tee-artik.bin
84
85 %clean
86
87 %files -n optee-os-rpi3
88 %license LICENSE
89 %license LICENSE.BSD-3-Clause
90 /boot/tee-pager.bin
91 /boot/tee.bin
92
93 %files ta
94 %license LICENSE
95 %license LICENSE.BSD-3-Clause
96 %license LICENSE.BSD-3-Clause.mod
97 /%{out_export_dir}/%{export_dir}
98
99 %files -n optee-os-artik710
100 %license LICENSE
101 %license LICENSE.BSD-3-Clause
102 /boot/tee-artik.bin