From abc8b4fe162a7199698989e7c0af329c87676fba Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Tue, 20 Sep 2022 18:38:46 -0400 Subject: [PATCH] arm/optee-client: move the 3.14 recipe to meta-arm-bsp 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 --- .../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 --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"