Skip to content
Snippets Groups Projects
Commit 5e11351f authored by Etienne Carriere's avatar Etienne Carriere
Browse files

factorize 'filelist' and 'update_rootfs' rules


Factorize embedded file list and rootfs generation for fvp, juno,
mediatek, qemu, qemu_v8 and rpi3.

busybox is madatory to all 'common' rootfs.
optee-client, xtestn helloworld are always embedded: moved to common.

Remove obsolete CFG_DEV_PATH.

Signed-off-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: default avatarJoakim Bech <joakim.bech@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Joakim Bech <joakim.bech@linaro.org> (RPi3, MTK8173)
Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu_v7/v8)
parent f3fa64d6
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ optee-client-clean-common:
XTEST_COMMON_FLAGS ?= CROSS_COMPILE_HOST=$(CROSS_COMPILE_NS_USER)\
CROSS_COMPILE_TA=$(CROSS_COMPILE_S_USER) \
TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) \
CFG_DEV_PATH=$(ROOT) \
OPTEE_CLIENT_EXPORT=$(OPTEE_CLIENT_EXPORT) \
COMPILE_NS_USER=$(COMPILE_NS_USER) \
O=$(OPTEE_TEST_OUT_PATH)
......@@ -249,3 +249,64 @@ HELLOWORLD_CLEAN_COMMON_FLAGS ?= TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR)
helloworld-clean-common:
$(MAKE) -C $(HELLOWORLD_PATH) $(HELLOWORLD_CLEAN_COMMON_FLAGS) clean
################################################################################
# rootfs
################################################################################
update_rootfs-common: busybox filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cat $(GEN_ROOTFS_FILELIST) >> $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH) && \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | \
gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
update_rootfs-clean-common:
rm -f $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
rm -f $(GEN_ROOTFS_PATH)/filelist-all.txt
rm -f $(GEN_ROOTFS_PATH)/filelist-tmp.txt
rm -f $(GEN_ROOTFS_FILELIST)
filelist-tee-common: fl:=$(GEN_ROOTFS_FILELIST)
filelist-tee-common: optee-client xtest helloworld
@echo "# filelist-tee-common /start" > $(fl)
@echo "dir /lib/optee_armtz 755 0 0" >> $(fl)
@echo "# xtest / optee_test" >> $(fl)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | \
sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(fl)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' \
>> $(fl)
@if [ -e $(HELLOWORLD_PATH)/host/hello_world ]; then \
echo "file /bin/hello_world" \
"$(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(fl); \
echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta" \
"$(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta" \
"444 0 0" >> $(fl); \
fi
@echo "# Secure storage dir" >> $(fl)
@echo "dir /data 755 0 0" >> $(fl)
@echo "dir /data/tee 755 0 0" >> $(fl)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(fl); \
echo "dir /lib/modules 755 0 0" >> $(fl); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" \
>> $(fl); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko" \
"$(OPTEE_GENDRV_MODULE) 755 0 0" \
>> $(fl); \
fi
@echo "# OP-TEE Client" >> $(fl)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" \
>> $(fl)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" \
>> $(fl)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(fl)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(fl)
@if [ -e $(OPTEE_CLIENT_EXPORT)/lib/libsqlfs.so.1.0 ]; then \
echo "file /lib/libsqlfs.so.1.0" \
"$(OPTEE_CLIENT_EXPORT)/lib/libsqlfs.so.1.0 755 0 0" \
>> $(fl); \
echo "slink /lib/libsqlfs.so.1 libsqlfs.so.1.0 755 0 0" >> $(fl); \
echo "slink /lib/libsqlfs.so libsqlfs.so.1 755 0 0" >> $(fl); \
fi
@echo "# filelist-tee-common /end" >> $(fl)
......@@ -139,35 +139,9 @@ helloworld-clean: helloworld-clean-common
################################################################################
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee:
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
update_rootfs: busybox optee-client xtest helloworld filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH); \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
filelist-tee: filelist-tee-common
update_rootfs: update_rootfs-common
################################################################################
# Run targets
......
......@@ -138,36 +138,11 @@ helloworld-clean: helloworld-clean-common
################################################################################
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee:
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
filelist-tee: filelist-tee-common
.PHONY: update_rootfs
update_rootfs: u-boot busybox optee-client xtest helloworld filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH) && \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
update_rootfs: u-boot
update_rootfs: update_rootfs-common
$(U-BOOT_PATH)/tools/mkimage -A arm64 -O linux -T ramdisk -C gzip \
-d $(GEN_ROOTFS_PATH)/filesystem.cpio.gz \
$(GEN_ROOTFS_PATH)/ramdisk.img
......
......@@ -112,35 +112,9 @@ helloworld-clean: helloworld-clean-common
################################################################################
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee:
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
update_rootfs: busybox optee-client xtest helloworld filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH); \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
filelist-tee: filelist-tee-common
update_rootfs: update_rootfs-common
################################################################################
# Image Tools
......
......@@ -132,35 +132,9 @@ helloworld-clean: helloworld-clean-common
################################################################################
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee: xtest helloworld
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
update_rootfs: busybox optee-client filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH); \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
filelist-tee: filelist-tee-common
update_rootfs: update_rootfs-common
################################################################################
# Run targets
......
......@@ -178,38 +178,12 @@ endif
################################################################################
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee: xtest helloworld
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
filelist-tee: filelist-tee-common
ifneq ("$(wildcard $(STRACE_PATH)/strace)","")
@echo "file /bin/strace $(STRACE_PATH)/strace 755 0 0" >> $(GEN_ROOTFS_FILELIST)
endif
update_rootfs: busybox optee-client filelist-tee
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH); \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
update_rootfs: update_rootfs-common
################################################################################
# Run targets
......
......@@ -191,33 +191,9 @@ helloworld-clean: helloworld-clean-common
# Root FS
################################################################################
.PHONY: filelist-tee
filelist-tee: helloworld
@echo "# xtest / optee_test" > $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/hello_world $(HELLOWORLD_PATH)/host/hello_world 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# TAs" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /lib/optee_armtz 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \
sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/optee_armtz/8aaaf200-2450-11e4-abe20002a5d5c51b.ta $(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.ta 444 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "# Secure storage dir" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /data/tee 755 0 0" >> $(GEN_ROOTFS_FILELIST)
filelist-tee: linux
filelist-tee: filelist-tee-common
@echo "dir /usr/bin 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@if [ -e $(OPTEE_GENDRV_MODULE) ]; then \
echo "# OP-TEE device" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko $(OPTEE_GENDRV_MODULE) 755 0 0" >> $(GEN_ROOTFS_FILELIST); \
fi
@echo "# OP-TEE Client" >> $(GEN_ROOTFS_FILELIST)
@echo "file /usr/include/tee_client_api.h $(OPTEE_CLIENT_EXPORT)/include/tee_client_api.h 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /usr/include/teec_trace.h $(OPTEE_CLIENT_EXPORT)/include/teec_trace.h 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "dir /boot 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /boot/bcm2710-rpi-3-b.dtb $(LINUX_DTB) 755 0 0" >> $(GEN_ROOTFS_FILELIST)
@echo "file /boot/config.txt $(RPI3_BOOT_CONFIG) 755 0 0" >> $(GEN_ROOTFS_FILELIST)
......@@ -240,10 +216,8 @@ filelist-tee: helloworld
@echo "file /boot/start_x.elf $(RPI3_STOCK_FW_PATH)/boot/start_x.elf 755 0 0" >> $(GEN_ROOTFS_FILELIST)
.PHONY: update_rootfs
update_rootfs: arm-tf busybox u-boot optee-client xtest filelist-tee linux
cat $(GEN_ROOTFS_PATH)/filelist-final.txt $(GEN_ROOTFS_PATH)/filelist-tee.txt > $(GEN_ROOTFS_PATH)/filelist.tmp
cd $(GEN_ROOTFS_PATH) && \
$(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz
update_rootfs: arm-tf u-boot
update_rootfs: update_rootfs-common
# Creating images etc, could wipe out a drive on the system, therefore we don't
# want to automate that in script or make target. Instead we just simply provide
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment