stm32mp: optee: add optee-client support by default

Optee-client provides the TEE Client API as defined by the GlobalPlatform TEE standard.
It is required to communicate with a Trusted Application (TA) running in a Trusted OS.

https://onedigi.atlassian.net/browse/DEL-8970

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2024-04-18 11:26:48 +02:00
parent afde974a17
commit 8e63e52435
3 changed files with 46 additions and 0 deletions

View File

@ -42,6 +42,9 @@ UBOOT_ENV_SIZE ?= "0x20000"
# available space in the environment partition)
UBOOT_ENV_RANGE ?= ""
# OPTEE runtime packages to install
OPTEE_PKGS ??= "optee-client"
MACHINE_EXTRA_RDEPENDS += " \
mtd-utils-ubifs \
"

View File

@ -0,0 +1,10 @@
[Unit]
Description=TEE Supplicant
[Service]
User=root
EnvironmentFile=-/etc/default/tee-supplicant
ExecStart=/usr/sbin/tee-supplicant $OPTARGS
[Install]
WantedBy=basic.target

View File

@ -0,0 +1,33 @@
SUMMARY = "OPTEE Client"
HOMEPAGE = "https://github.com/OP-TEE/optee_client"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
inherit python3native systemd cmake
SRC_URI = "git://github.com/OP-TEE/optee_client.git;protocol=https;branch=master \
file://tee-supplicant.service \
"
SRCREV = "06db73b3f3fdb8d23eceaedbc46c49c0b45fd1e2"
PV = "3.16.0+git${SRCPV}"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
EXTRA_OECMAKE = " \
-DCFG_TEE_FS_PARENT_PATH='${localstatedir}/lib/tee' \
-DCFG_WERROR=OFF \
-DCFG_TEE_CLIENT_LOG_LEVEL=2 \
-DBUILD_SHARED_LIBS=ON \
"
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
fi
}
FILES:${PN} += "${systemd_system_unitdir}"