Browse Source
kernel: update e2000 linux kernel version Signed-off-by: liutianyu1250 <liutianyu1250@phytium.com.cn>pull/6/MERGE
liutianyu1250
2 years ago
committed by
weishanshan1084
14 changed files with 175 additions and 8 deletions
@ -1,2 +1,2 @@ |
|||||
# kernel 4.19 |
# kernel 4.19 |
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="2bc82f364da6e5d815219b3d670071245770fbaf" |
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a47ede16e33d2662535084f49e73945d572d4f38" |
||||
|
@ -0,0 +1,8 @@ |
|||||
|
# for linux kernel support optee |
||||
|
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/e2000_optee.config" |
||||
|
|
||||
|
BR2_PACKAGE_PHYTIUM_OPTEE=y |
||||
|
|
||||
|
BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_URL="git@gitee.com:phytium_embedded/phytium-optee.git" |
||||
|
BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION="v1.1" |
||||
|
BR2_PACKAGE_PHYTIUM_OPTEE_BOARD="e2000ddemo" |
@ -0,0 +1,29 @@ |
|||||
|
config BR2_PACKAGE_PHYTIUM_OPTEE |
||||
|
bool "phytium_optee" |
||||
|
help |
||||
|
Phytium OPTEE provides OP-TEE OS, client, examples. |
||||
|
|
||||
|
|
||||
|
if BR2_PACKAGE_PHYTIUM_OPTEE |
||||
|
|
||||
|
config BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_URL |
||||
|
string "URL of phytium optee custom repository" |
||||
|
help |
||||
|
Specific location of the reference source tree Git |
||||
|
repository. |
||||
|
|
||||
|
config BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION |
||||
|
string "Custom repository version" |
||||
|
help |
||||
|
Revision to use in the typical format used by Git, i.e a |
||||
|
SHA1 or a tag. |
||||
|
|
||||
|
config BR2_PACKAGE_PHYTIUM_OPTEE_BOARD |
||||
|
string "Target board" |
||||
|
help |
||||
|
Value for the target board directive provided to |
||||
|
Phytium OPTEE build script. Support: |
||||
|
"e2000demod", debug version; |
||||
|
"e2000demor", release version. |
||||
|
|
||||
|
endif # BR2_PACKAGE_PHYTIUM_OPTEE |
@ -0,0 +1,48 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
DAEMON="tee-supplicant" |
||||
|
|
||||
|
DAEMON_ARGS="-d /dev/teepriv0" |
||||
|
|
||||
|
start() { |
||||
|
printf 'Starting %s: ' "$DAEMON" |
||||
|
start-stop-daemon -S -q -x "/usr/bin/$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 -x "/usr/bin/$DAEMON" |
||||
|
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 |
@ -0,0 +1,55 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# phytium-optee
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
PHYTIUM_OPTEE_SITE_METHOD = git |
||||
|
PHYTIUM_OPTEE_SITE = $(call qstrip,$(BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_URL)) |
||||
|
PHYTIUM_OPTEE_VERSION = $(call qstrip,$(BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION)) |
||||
|
|
||||
|
PHTYIUM_OPTEE_TARGET_BOARD = $(call qstrip,$(BR2_PACKAGE_PHYTIUM_OPTEE_BOARD)) |
||||
|
|
||||
|
# install optee os/client sdk in staging
|
||||
|
# if other package need build CA & TA, CA will use default staging path.
|
||||
|
# TA need set TA_DEV_KIT_DIR=$(PHYTIUM_OPTEE_OS_SDK).
|
||||
|
PHYTIUM_OPTEE_OS_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64 |
||||
|
PHYTIUM_OPTEE_CLIENT_SDK = $(STAGING_DIR)/usr |
||||
|
|
||||
|
# build optee os need this package in host
|
||||
|
PHYTIUM_OPTEE_DEPENDENCIES = host-openssl host-python3 host-python-pycryptodomex host-python-pyelftools |
||||
|
|
||||
|
PHYTIUM_OPTEE_INSTALL_IMAGES = YES |
||||
|
PHYTIUM_OPTEE_INSTALL_STAGING = YES |
||||
|
|
||||
|
define PHYTIUM_OPTEE_BUILD_CMDS |
||||
|
cd $(@D); ./build_all clean; CROSS_COMPILE64=$(TARGET_CROSS) ./build_all $(PHTYIUM_OPTEE_TARGET_BOARD) d |
||||
|
endef |
||||
|
|
||||
|
# install lib & ta & client into rootfs
|
||||
|
define PHYTIUM_OPTEE_INSTALL_TARGET_CMDS |
||||
|
cp -dpf $(@D)/out/data/bin/* $(TARGET_DIR)/usr/bin |
||||
|
cp -dpf $(@D)/out/data/lib/* $(TARGET_DIR)/usr/lib |
||||
|
mkdir -p $(TARGET_DIR)/data/optee_armtz |
||||
|
cp $(@D)/out/data/optee_armtz/* $(TARGET_DIR)/data/optee_armtz |
||||
|
endef |
||||
|
|
||||
|
# install tee.bin into BINARIES_DIR, so that can use tboot to load tee os.
|
||||
|
define PHYTIUM_OPTEE_INSTALL_IMAGES_CMDS |
||||
|
cp -dpf $(@D)/out/*.bin $(BINARIES_DIR) |
||||
|
endef |
||||
|
|
||||
|
# install sdk for build other package
|
||||
|
define PHYTIUM_OPTEE_INSTALL_STAGING_CMDS |
||||
|
#echo $(STAGING_DIR) |
||||
|
mkdir -p $(PHYTIUM_OPTEE_OS_SDK) |
||||
|
cp -ardpf $(@D)/out/data/link/export/usr/* $(PHYTIUM_OPTEE_CLIENT_SDK) |
||||
|
endef |
||||
|
|
||||
|
|
||||
|
define PHYTIUM_OPTEE_INSTALL_INIT_SYSV |
||||
|
$(INSTALL) -m 0755 -D $(PHYTIUM_OPTEE_PKGDIR)/S30phytium-optee \
|
||||
|
$(TARGET_DIR)/etc/init.d/S30phytium-optee |
||||
|
endef |
||||
|
|
||||
|
$(eval $(generic-package)) |
@ -0,0 +1,10 @@ |
|||||
|
[Unit] |
||||
|
Description=phytium tee supplicant |
||||
|
|
||||
|
[Service] |
||||
|
User=root |
||||
|
ExecStart=tee-supplicant /dev/teepriv0 |
||||
|
Restart=always |
||||
|
|
||||
|
[Install] |
||||
|
WantedBy=sysinit.target |
Loading…
Reference in new issue