package/optee-client: add option to configure TEE-based storage location
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Tue, 24 Mar 2020 15:42:55 +0000 (16:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 29 Mar 2020 20:19:25 +0000 (22:19 +0200)
OP-TEE provides the possibility of secure storage done by the
normal world OS via tee-supplicant.

The location is a compile-time value and by default it is /data/tee .
As this might not be suitable for all use-cases add an option to
set the CFG_TEE_FS_PARENT_PATH compile option.

Default value is still /data/tee as it was before adding this option.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/optee-client/Config.in
package/optee-client/optee-client.mk

index e519a134569f750d1975168a36e1dba2c8598326..1ef0a1401e2cef3ac4b6ea43538fc073b01895b4 100644 (file)
@@ -13,5 +13,17 @@ config BR2_PACKAGE_OPTEE_CLIENT
 
          https://github.com/OP-TEE/optee_client
 
+if BR2_PACKAGE_OPTEE_CLIENT
+
+config BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH
+       string "Path for normal world OS secure storage"
+       default "/data/tee"
+       help
+         Path to storage area for secure storage based on the
+         normal world OS providing the actual storage via
+         tee-supplicant.
+
+endif
+
 comment "optee-client needs a toolchain w/ threads"
        depends on !BR2_TOOLCHAIN_HAS_THREADS
index 15bebdc61540916c0e6d53bae7efe0c2a572819c..64235b41e43a33c1cd3dbad72ad9e636f6ab67a2 100644 (file)
@@ -10,6 +10,9 @@ OPTEE_CLIENT_LICENSE = BSD-2-Clause
 OPTEE_CLIENT_LICENSE_FILES = LICENSE
 OPTEE_CLIENT_INSTALL_STAGING = YES
 
+OPTEE_CLIENT_CONF_OPTS = \
+       -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH)
+
 define OPTEE_CLIENT_INSTALL_INIT_SYSV
        $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \
                $(TARGET_DIR)/etc/init.d/S30optee