Initial Commit
- initial default booting image
This commit is contained in:
100
package/optee-client/Config.in
Normal file
100
package/optee-client/Config.in
Normal file
@@ -0,0 +1,100 @@
|
||||
config BR2_PACKAGE_OPTEE_CLIENT
|
||||
bool "optee-client"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 # MMC_IOC_MULTI_CMD
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
Enable the OP-TEE client package that brings non-secure
|
||||
client application resources for OP-TEE support. OP-TEE
|
||||
client is a component delivered by the OP-TEE project.
|
||||
|
||||
The client API library allows application to invoke trusted
|
||||
applications hosted in the OP-TEE OS secure world. The
|
||||
supplicant provides services hosted by the non-secure world
|
||||
and invoked by the secure world.
|
||||
|
||||
https://github.com/OP-TEE/optee_client
|
||||
|
||||
if BR2_PACKAGE_OPTEE_CLIENT
|
||||
|
||||
choice
|
||||
prompt "optee-client version"
|
||||
default BR2_PACKAGE_OPTEE_CLIENT_AS_OS \
|
||||
if BR2_TARGET_OPTEE_OS_CUSTOM_VERSION
|
||||
default BR2_PACKAGE_OPTEE_CLIENT_LATEST
|
||||
help
|
||||
Select the version of optee-client you want to use
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_AS_OS
|
||||
bool "Same as optee-os being built"
|
||||
depends on BR2_TARGET_OPTEE_OS_CUSTOM_VERSION
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_LATEST
|
||||
bool "4.9.0"
|
||||
help
|
||||
Use the latest release tag from the optee-client official Git
|
||||
repository.
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
help
|
||||
This option allows to specify a URL pointing to an
|
||||
optee-client source tarball. This URL can use any protocol
|
||||
recognized by Buildroot, like http://, ftp://, file://
|
||||
or scp://.
|
||||
|
||||
When pointing to a local tarball using file://, you may want
|
||||
to use a make variable like $(TOPDIR) to reference the root of
|
||||
the Buildroot tree.
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom optee-client tarball"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_VERSION
|
||||
string
|
||||
default BR2_TARGET_OPTEE_OS_CUSTOM_VERSION_VALUE \
|
||||
if BR2_PACKAGE_OPTEE_CLIENT_AS_OS
|
||||
default "4.9.0" if BR2_PACKAGE_OPTEE_CLIENT_LATEST
|
||||
default "custom" if BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL
|
||||
|
||||
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.
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_RPMB_EMU
|
||||
bool "Enable RPMB emulation"
|
||||
default y
|
||||
help
|
||||
Enable RPMB device emulation in tee-supplicant.
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_SUPP_PLUGINS
|
||||
bool "Enable TEE supplicant plugins"
|
||||
default y
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
help
|
||||
Enable TEE supplicant plugin support.
|
||||
|
||||
config BR2_PACKAGE_OPTEE_CLIENT_TEEACL
|
||||
bool "Enable TEE Access Control List login"
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
|
||||
help
|
||||
Enable TEE ACL login identification for OP-TEE service that
|
||||
supports them as OP-TEE PKCS#11 services.
|
||||
|
||||
endif
|
||||
|
||||
comment "optee-client needs a toolchain w/ threads, headers >= 4.3"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
|
||||
50
package/optee-client/S30tee-supplicant
Normal file
50
package/optee-client/S30tee-supplicant
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="tee-supplicant"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
DAEMON_ARGS="-d /dev/teepriv0"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
|
||||
-- $DAEMON_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature (does not
|
||||
# reconfigure/restart on SIGHUP, just closes all open files).
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
3
package/optee-client/optee-client.hash
Normal file
3
package/optee-client/optee-client.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 2ef152f25b682e59c3684d6d73d7c5a138495615f6b045e95266eb3d0bc0d04e optee-client-4.9.0.tar.gz
|
||||
sha256 fda8385993f112d7ca61b88b54ba5b4cbeec7e43a0f9b317d5186703c1985e8f LICENSE
|
||||
58
package/optee-client/optee-client.mk
Normal file
58
package/optee-client/optee-client.mk
Normal file
@@ -0,0 +1,58 @@
|
||||
################################################################################
|
||||
#
|
||||
# optee-client
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPTEE_CLIENT_VERSION = $(call qstrip,$(BR2_PACKAGE_OPTEE_CLIENT_VERSION))
|
||||
OPTEE_CLIENT_LICENSE = BSD-2-Clause
|
||||
OPTEE_CLIENT_LICENSE_FILES = LICENSE
|
||||
OPTEE_CLIENT_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL),y)
|
||||
OPTEE_CLIENT_TARBALL = $(call qstrip,$(BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL_LOCATION))
|
||||
OPTEE_CLIENT_SITE = $(patsubst %/,%,$(dir $(OPTEE_CLIENT_TARBALL)))
|
||||
OPTEE_CLIENT_SOURCE = $(notdir $(OPTEE_CLIENT_TARBALL))
|
||||
else
|
||||
OPTEE_CLIENT_SITE = $(call github,OP-TEE,optee_client,$(OPTEE_CLIENT_VERSION))
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT):$(BR2_PACKAGE_OPTEE_CLIENT_LATEST),y:)
|
||||
BR_NO_CHECK_HASH_FOR += $(OPTEE_CLIENT_SOURCE)
|
||||
endif
|
||||
|
||||
OPTEE_CLIENT_CONF_OPTS = \
|
||||
-DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \
|
||||
-DCFG_WERROR=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_RPMB_EMU),y)
|
||||
OPTEE_CLIENT_CONF_OPTS += -DRPMB_EMU=ON
|
||||
else
|
||||
OPTEE_CLIENT_CONF_OPTS += -DRPMB_EMU=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_SUPP_PLUGINS),y)
|
||||
OPTEE_CLIENT_CONF_OPTS += -DCFG_TEE_SUPP_PLUGINS=ON
|
||||
else
|
||||
OPTEE_CLIENT_CONF_OPTS += -DCFG_TEE_SUPP_PLUGINS=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_TEEACL),y)
|
||||
OPTEE_CLIENT_DEPENDENCIES += host-pkgconf util-linux
|
||||
OPTEE_CLIENT_CONF_OPTS += -DWITH_TEEACL=ON
|
||||
else
|
||||
OPTEE_CLIENT_CONF_OPTS += -DWITH_TEEACL=OFF
|
||||
endif
|
||||
|
||||
define OPTEE_CLIENT_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30tee-supplicant \
|
||||
$(TARGET_DIR)/etc/init.d/S30tee-supplicant
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL)$(BR_BUILDING),yy)
|
||||
ifeq ($(call qstrip,$(BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL_LOCATION)),)
|
||||
$(error No tarball location specified. Please check BR2_PACKAGE_OPTEE_CLIENT_CUSTOM_TARBALL_LOCATION)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user