aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2016-09-07 16:44:14 -0500
committerFathi Boudra <fathi.boudra@linaro.org>2016-11-02 08:45:02 +0200
commit4ab450b5d6d751a2ddc106fddcaecc58b9e640d1 (patch)
tree0dbdfca525e93ecda18b01a00c03881a57290793
parent85faf6c6824597e7fd9e2d35fc9d8da2e9f90bc7 (diff)
optee-client: Add TEE supplicant systemd service unit.
Change-Id: I12741b8405ee28485e9ca95bea489b588f240874 Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-rw-r--r--meta-optee/recipes-security/optee/optee-client.bb13
-rw-r--r--meta-optee/recipes-security/optee/optee-client/tee-supplicant.service10
2 files changed, 21 insertions, 2 deletions
diff --git a/meta-optee/recipes-security/optee/optee-client.bb b/meta-optee/recipes-security/optee/optee-client.bb
index 023ab523..02a5c1f0 100644
--- a/meta-optee/recipes-security/optee/optee-client.bb
+++ b/meta-optee/recipes-security/optee/optee-client.bb
@@ -6,13 +6,16 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
PV = "2.0.0+git${SRCPV}"
-inherit pythonnative
+inherit pythonnative systemd
-SRC_URI = "git://github.com/OP-TEE/optee_client.git"
+SRC_URI = "git://github.com/OP-TEE/optee_client.git \
+ file://tee-supplicant.service"
S = "${WORKDIR}/git"
SRCREV = "17d1addc465a667f375837cdbe4fa7ebac08539b"
+SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
+
do_compile() {
install -d ${D}${prefix}
oe_runmake EXPORT_DIR=${D}${prefix}/
@@ -27,5 +30,11 @@ do_install() {
ln -s libteec.so.1.0 libteec.so.1
ln -s libteec.so.1.0 libteec.so
)
+
+ 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-optee/recipes-security/optee/optee-client/tee-supplicant.service b/meta-optee/recipes-security/optee/optee-client/tee-supplicant.service
new file mode 100644
index 00000000..82bc8303
--- /dev/null
+++ b/meta-optee/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/bin/tee-supplicant $OPTARGS
+
+[Install]
+WantedBy=basic.target