diff mbox series

[4/4] arm/optee-client: move the 3.14 recipe to meta-arm-bsp

Message ID 20220920223846.8000-4-jon.mason@arm.com
State New
Headers show
Series [1/4] arm/optee-os: add ARMv7 changes to clang patch and update patches | expand

Commit Message

Jon Mason Sept. 20, 2022, 10:38 p.m. UTC
Only corstone1000 is using the legacy version of optee-client.  Move it
there to keep corstone1000 working, while removing it from meta-arm to
discourage use of the non-latest version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 .../optee/optee-client/tee-supplicant.service | 10 ++++
 .../optee/optee-client/tee-supplicant.sh      | 46 +++++++++++++++++++
 .../optee/optee-client_3.14.0.bb              |  2 +-
 3 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.service
 create mode 100644 meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.sh
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-client_3.14.0.bb (52%)
diff mbox series

Patch

diff --git a/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.service b/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.service
new file mode 100644
index 00000000..c273832d
--- /dev/null
+++ b/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.service
@@ -0,0 +1,10 @@ 
+[Unit]
+Description=TEE Supplicant
+
+[Service]
+User=root
+EnvironmentFile=-@sysconfdir@/default/tee-supplicant
+ExecStart=@sbindir@/tee-supplicant $OPTARGS
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.sh b/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.sh
new file mode 100644
index 00000000..b4d21950
--- /dev/null
+++ b/meta-arm-bsp/recipes-security/optee/optee-client/tee-supplicant.sh
@@ -0,0 +1,46 @@ 
+#!/bin/sh
+
+# Source function library
+. /etc/init.d/functions
+
+NAME=tee-supplicant
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="OP-TEE Supplicant"
+
+DAEMON=@sbindir@/$NAME
+
+test -f $DAEMON || exit 0
+
+test -f @sysconfdir@/default/$NAME && . @sysconfdir@/default/$NAME
+test -f @sysconfdir@/default/rcS && . @sysconfdir@/default/rcS
+
+SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- -d $OPTARGS"
+
+set -e
+
+case $1 in
+    start)
+	    echo -n "Starting $DESC: "
+	    start-stop-daemon --start $SSD_OPTIONS
+        echo "${DAEMON##*/}."
+        ;;
+    stop)
+	    echo -n "Stopping $DESC: "
+	    start-stop-daemon --stop $SSD_OPTIONS
+        echo "${DAEMON##*/}."
+        ;;
+    restart|force-reload)
+	    $0 stop
+	    sleep 1
+	    $0 start
+        ;;
+    status)
+        status ${DAEMON} || exit $?
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/meta-arm/recipes-security/optee/optee-client_3.14.0.bb b/meta-arm-bsp/recipes-security/optee/optee-client_3.14.0.bb
similarity index 52%
rename from meta-arm/recipes-security/optee/optee-client_3.14.0.bb
rename to meta-arm-bsp/recipes-security/optee/optee-client_3.14.0.bb
index be78b880..641fb0a0 100644
--- a/meta-arm/recipes-security/optee/optee-client_3.14.0.bb
+++ b/meta-arm-bsp/recipes-security/optee/optee-client_3.14.0.bb
@@ -1,3 +1,3 @@ 
-require optee-client.inc
+require recipes-security/optee/optee-client.inc
 
 SRCREV = "06e1b32f6a7028e039c625b07cfc25fda0c17d53"