Skip to content

Commit

Permalink
common.mk post-build.sh S30optee: change /data to /var/lib
Browse files Browse the repository at this point in the history
/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:
OP-TEE/optee_client#391

Reviewed-by: Jerome Forissier <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Mikko Rapeli <[email protected]>
  • Loading branch information
mikkorapeli-linaro authored and jforissier committed Oct 10, 2024
1 parent 3bd5a3b commit 3d4497c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions br-ext/board/qemu/post-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions br-ext/package/optee_client_ext/S30optee
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ endif
# 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)
Expand All @@ -90,7 +90,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
Expand Down

0 comments on commit 3d4497c

Please sign in to comment.