blob: 0019e8c8883962287e3e5501b7d853a4266afad2 (
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
|
# Copyright (C) 2017-2020 NXP
SUMMARY = "OPTEE test"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native optee-os optee-client openssl"
SRCBRANCH = "imx_5.4.70_2.3.0"
SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
SRCREV = "0c998f42a3fb87b9f2929955cf4b0116cc515091"
inherit python3native
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH:armv7a = "arm32"
OPTEE_ARCH:aarch64 = "arm64"
TA_DEV_KIT_DIR:arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32/"
TA_DEV_KIT_DIR:aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64/"
CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
EXTRA_OEMAKE = " \
TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
ARCH=${OPTEE_ARCH} \
OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr \
CROSS_COMPILE_HOST=${HOST_PREFIX} \
CROSS_COMPILE_TA=${HOST_PREFIX} \
CROSS_COMPILE=${HOST_PREFIX} \
OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \
-C ${S} O=${B} \
"
do_compile() {
cd ${S}
# Top level makefile doesn't seem to handle parallel make gracefully
oe_runmake xtest
oe_runmake ta
}
do_compile[cleandirs] = "${B}"
do_install () {
install -d ${D}/usr/bin
install ${B}/xtest/xtest ${D}/usr/bin/
install -d ${D}/lib/optee_armtz
find ${B}/ta -name '*.ta' | while read name; do
install -m 444 $name ${D}/lib/optee_armtz/
done
}
FILES:${PN} = "/usr/bin/ /lib*/optee_armtz/"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
|