From 01482e0ff68c238541940da73784d6ce763ea631 Mon Sep 17 00:00:00 2001 From: Mikko Rapeli Date: Mon, 7 Oct 2024 08:13:33 +0100 Subject: [PATCH] common.mk post-build.sh S30optee: change /data to /var/lib /data/tee is not FHS compatible path. Use /var/lib/tee instead. Related to optee_client side CMake change to use standard CMake install and runtime paths: https://github.com/OP-TEE/optee_client/pull/391 Reviewed-by: Jerome Forissier Signed-off-by: Mikko Rapeli --- br-ext/board/qemu/post-build.sh | 4 ++-- br-ext/package/optee_client_ext/S30optee | 4 ++-- common.mk | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/br-ext/board/qemu/post-build.sh b/br-ext/board/qemu/post-build.sh index eb0abc00..5b4f8b59 100755 --- a/br-ext/board/qemu/post-build.sh +++ b/br-ext/board/qemu/post-build.sh @@ -36,8 +36,8 @@ if [[ $VIRTFS_AUTOMOUNT == "y" ]]; then fi if [[ $PSS_AUTOMOUNT == "y" ]]; then - mkdir -p "$TARGETDIR"/data/tee + mkdir -p "$TARGETDIR"/var/lib/tee grep secure "$TARGETDIR"/etc/fstab > /dev/null || \ - echo "secure /data/tee 9p trans=virtio,version=9p2000.L,msize=65536,rw 0 0" >> "$TARGET_DIR"/etc/fstab + echo "secure /var/lib/tee 9p trans=virtio,version=9p2000.L,msize=65536,rw 0 0" >> "$TARGET_DIR"/etc/fstab echo "[+] persistent secure storage mount added to fstab" fi diff --git a/br-ext/package/optee_client_ext/S30optee b/br-ext/package/optee_client_ext/S30optee index 869bb5b7..f30e62a2 100755 --- a/br-ext/package/optee_client_ext/S30optee +++ b/br-ext/package/optee_client_ext/S30optee @@ -19,8 +19,8 @@ start() { echo "FAIL" return "$status" fi - printf 'Create/set permissions on %s: ' "/data/tee" - mkdir -p /data/tee && chown -R tee:tee /data/tee && chmod 0770 /data/tee + printf 'Create/set permissions on %s: ' "/var/lib/tee" + mkdir -p /var/lib/tee && chown -R tee:tee /var/lib/tee && chmod 0770 /var/lib/tee status=$? if [ "$status" -eq 0 ]; then echo "OK" diff --git a/common.mk b/common.mk index 9780c99f..08a15500 100644 --- a/common.mk +++ b/common.mk @@ -59,7 +59,7 @@ CCACHE ?= $(shell which ccache) # Don't remove this comment (space is needed) # 1) make QEMU_VIRTFS_AUTOMOUNT=y run # will mount the project's root on the host as /mnt/host in QEMU. # 2) mkdir -p /tmp/qemu-data-tee && make QEMU_PSS_AUTOMOUNT=y run -# will mount the host directory /tmp/qemu-data-tee as /data/tee +# will mount the host directory /tmp/qemu-data-tee as /var/lib/tee # in QEMU, thus creating persistent secure storage. ifeq ($(QEMU_VIRTFS_AUTOMOUNT),y) @@ -85,7 +85,7 @@ QEMU_VIRTFS_HOST_DIR ?= $(ROOT) # Persistent Secure Storage via shared folder # # Set QEMU_PSS_ENABLE to 'y' and adjust QEMU_PSS_HOST_DIR # # Then in QEMU, run: -# # $ mount -t 9p -o trans=virtio secure /data/tee +# # $ mount -t 9p -o trans=virtio secure /var/lib/tee # # Or enable QEMU_PSS_AUTOMOUNT QEMU_PSS_ENABLE ?= n QEMU_PSS_HOST_DIR ?= /tmp/qemu-data-tee