blob: 11193dcf3fa1e66c30dfa4abc3c704bb4728873f [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001SUMMARY = "OP-TEE Trusted OS"
2DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE"
3HOMEPAGE = "https://www.op-tee.org/"
4
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
7
8inherit deploy python3native
9require optee.inc
10
11CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os"
12
13DEPENDS = "python3-pyelftools-native python3-cryptography-native"
14
15DEPENDS:append:toolchain-clang = " compiler-rt"
16
17SRC_URI = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https"
18
19SRC_URI:append = " \
20 file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \
21 file://0007-allow-setting-sysroot-for-clang.patch \
22 "
23
24S = "${WORKDIR}/git"
25B = "${WORKDIR}/build"
26
27EXTRA_OEMAKE += " \
28 PLATFORM=${OPTEEMACHINE} \
29 CFG_${OPTEE_CORE}_core=y \
30 CROSS_COMPILE_core=${HOST_PREFIX} \
31 CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
32 NOWERROR=1 \
33 ta-targets=ta_${OPTEE_ARCH} \
34 O=${B} \
35"
36
37CFLAGS[unexport] = "1"
38LDFLAGS[unexport] = "1"
39CPPFLAGS[unexport] = "1"
40AS[unexport] = "1"
41LD[unexport] = "1"
42
43do_configure[noexec] = "1"
44
45do_compile() {
46 oe_runmake -C ${S} all
47}
48do_compile[cleandirs] = "${B}"
49
50do_install() {
51 #install core in firmware
52 install -d ${D}${nonarch_base_libdir}/firmware/
53 install -m 644 ${B}/core/*.bin ${B}/core/tee.elf ${D}${nonarch_base_libdir}/firmware/
54}
55
56PACKAGE_ARCH = "${MACHINE_ARCH}"
57
58do_deploy() {
59 install -d ${DEPLOYDIR}/${MLPREFIX}optee
60 install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/${MLPREFIX}optee
61}
62
63addtask deploy before do_build after do_install
64
65SYSROOT_DIRS += "${nonarch_base_libdir}/firmware"
66
67FILES:${PN} = "${nonarch_base_libdir}/firmware/"
68
69# note: "textrel" is not triggered on all archs
70INSANE_SKIP:${PN} = "textrel"
71# Build paths are currently embedded
72INSANE_SKIP:${PN} += "buildpaths"
73INSANE_SKIP:${PN}-dev = "staticdev"
74INHIBIT_PACKAGE_STRIP = "1"
75