added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/sh
#
# Create a systemd environment file for tee-supplicant
# $1 is the path to the file to be generated.
# At the moment this figures out the --rpmb-cid parameter to be given to
# tee-supplicant, indicating which eMMC device OP-TEE should use for RPMB
# storage.
# No file is generated if no device is found (not an error) or if multiple
# eMMCs are found (which is an error).
[ "$1" ] || { echo Usage: $0 FILE >&2; exit 1; }
for f in /sys/class/mmc_host/mmc*/mmc*\:*/raw_rpmb_size_mult; do
[ "$CID" ] && { echo $0: Multiple eMMC devices found, not chosing one automatically >&2; exit 2; }
# POSIX shells don't expand globbing patterns that match no file
[ -e $f ] || exit 0
SYS_MMC_PATH=$(dirname $f)
CID=$(cat $SYS_MMC_PATH/cid)
done
[ "$CID" ] && echo RPMB_CID="--rpmb-cid $CID" >$1

View File

@@ -0,0 +1,2 @@
KERNEL=="tee[0-9]*", MODE="0660", OWNER="root", GROUP="teeclnt", TAG+="systemd", ENV{SYSTEMD_WANTS}+="tee.device"
KERNEL=="teepriv[0-9]*", MODE="0660", OWNER="root", GROUP="tee", TAG+="systemd", ENV{SYSTEMD_WANTS}+="teepriv.device"

View File

@@ -0,0 +1,16 @@
[Unit]
Description=TEE Supplicant
Wants=dev-tee0.device
After=dev-tee0.device
After=systemd-udevd.service
[Service]
User=tee
Group=tee
EnvironmentFile=-/etc/default/tee-supplicant
ExecStartPre=/usr/sbin/create-tee-supplicant-env /tmp/tee-supplicant.env
EnvironmentFile=-/tmp/tee-supplicant.env
ExecStart=/usr/sbin/tee-supplicant $RPMB_CID $OPTARGS
[Install]
WantedBy=basic.target