[1/5] optee-client.bb: add optee client recipe and patches

Message ID 1580319525-32054-2-git-send-email-peter.griffin@linaro.org
State New
Headers show
Series
  • Add OP-TEE recipes to meta-arm layer
Related show

Commit Message

Peter Griffin Jan. 29, 2020, 5:38 p.m.
This has moved from meta-linaro to meta-arm as this
is the new place for general recipes for Arm arch
and has a mailing list for external contributors.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>

---
 meta-arm/recipes-security/optee/optee-client.bb    | 35 ++++++++++++++++++++++
 .../optee/optee-client/tee-supplicant.service      | 10 +++++++
 2 files changed, 45 insertions(+)
 create mode 100644 meta-arm/recipes-security/optee/optee-client.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-client/tee-supplicant.service

-- 
2.7.4

Patch

diff --git a/meta-arm/recipes-security/optee/optee-client.bb b/meta-arm/recipes-security/optee/optee-client.bb
new file mode 100644
index 0000000..519683a
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-client.bb
@@ -0,0 +1,35 @@ 
+SUMMARY = "OPTEE Client"
+HOMEPAGE = "https://github.com/OP-TEE/optee_client"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+
+PV = "3.7.0+git${SRCPV}"
+
+inherit python3native systemd
+
+SRC_URI = "git://github.com/OP-TEE/optee_client.git \
+           file://tee-supplicant.service"
+S = "${WORKDIR}/git"
+
+SRCREV = "bc0ec8ce1e4dc5ae23f4737ef659338b7cd408fe"
+
+SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
+
+do_install() {
+    oe_runmake install
+
+    install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
+
+    install -D -p -m0644 ${S}/out/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
+    ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
+    ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
+
+    cp -a ${S}/out/export/usr/include ${D}/usr/
+
+    sed -i -e s:/etc:${sysconfdir}:g \
+           -e s:/usr/bin:${bindir}:g \
+              ${WORKDIR}/tee-supplicant.service
+
+    install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
+}
diff --git a/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service b/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service
new file mode 100644
index 0000000..ffb54d3
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service
@@ -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