diff options
-rw-r--r-- | common.mk | 44 | ||||
-rw-r--r-- | fvp.mk | 10 | ||||
-rw-r--r-- | hikey.mk | 15 | ||||
-rw-r--r-- | hikey_debian.mk | 30 | ||||
-rw-r--r-- | juno.mk | 11 | ||||
-rw-r--r-- | mediatek.mk | 12 | ||||
-rw-r--r-- | qemu.mk | 11 | ||||
-rw-r--r-- | qemu_v8.mk | 10 | ||||
-rw-r--r-- | rpi3.mk | 15 | ||||
-rw-r--r-- | ti/ti-common.mk | 17 |
10 files changed, 96 insertions, 79 deletions
@@ -16,7 +16,7 @@ OPTEE_CLIENT_PATH ?= $(ROOT)/optee_client OPTEE_CLIENT_EXPORT ?= $(OPTEE_CLIENT_PATH)/out/export OPTEE_TEST_PATH ?= $(ROOT)/optee_test OPTEE_TEST_OUT_PATH ?= $(ROOT)/optee_test/out -HELLOWORLD_PATH ?= $(ROOT)/hello_world +OPTEE_EXAMPLES_PATH ?= $(ROOT)/optee_examples BENCHMARK_APP_PATH ?= $(ROOT)/optee_benchmark # default high verbosity. slow uarts shall specify lower if prefered @@ -297,7 +297,7 @@ OPTEE_OS_CLEAN_COMMON_FLAGS ?= $(OPTEE_OS_COMMON_EXTRA_FLAGS) ifeq ($(CFG_TEE_BENCHMARK),y) optee-os-clean-common: benchmark-app-clean-common endif -optee-os-clean-common: xtest-clean helloworld-clean +optee-os-clean-common: xtest-clean optee-examples-clean $(MAKE) -C $(OPTEE_OS_PATH) $(OPTEE_OS_CLEAN_COMMON_FLAGS) clean OPTEE_CLIENT_COMMON_FLAGS ?= CROSS_COMPILE=$(CROSS_COMPILE_NS_USER) \ @@ -343,22 +343,23 @@ xtest-patch-common: $(MAKE) -C $(OPTEE_TEST_PATH) $(XTEST_PATCH_COMMON_FLAGS) patch ################################################################################ -# hello_world +# sample applications / optee_examples ################################################################################ -HELLOWORLD_COMMON_FLAGS ?= HOST_CROSS_COMPILE=$(CROSS_COMPILE_NS_USER)\ +OPTEE_EXAMPLES_COMMON_FLAGS ?= HOST_CROSS_COMPILE=$(CROSS_COMPILE_NS_USER)\ TA_CROSS_COMPILE=$(CROSS_COMPILE_S_USER) \ TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) \ TEEC_EXPORT=$(OPTEE_CLIENT_EXPORT) -.PHONY: helloworld-common -helloworld-common: optee-os optee-client - $(MAKE) -C $(HELLOWORLD_PATH) $(HELLOWORLD_COMMON_FLAGS) +.PHONY: optee-examples-common +optee-examples-common: optee-os optee-client + $(MAKE) -C $(OPTEE_EXAMPLES_PATH) $(OPTEE_EXAMPLES_COMMON_FLAGS) -HELLOWORLD_CLEAN_COMMON_FLAGS ?= TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) +OPTEE_EXAMPLES_CLEAN_COMMON_FLAGS ?= TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) -.PHONY: helloworld-clean-common -helloworld-clean-common: - $(MAKE) -C $(HELLOWORLD_PATH) $(HELLOWORLD_CLEAN_COMMON_FLAGS) clean +.PHONY: optee-examples-clean-common +optee-examples-clean-common: + $(MAKE) -C $(OPTEE_EXAMPLES_PATH) \ + $(OPTEE_EXAMPLES_CLEAN_COMMON_FLAGS) clean ################################################################################ # benchmark_app @@ -398,22 +399,27 @@ ifeq ($(CFG_TEE_BENCHMARK),y) filelist-tee-common: benchmark-app endif filelist-tee-common: fl:=$(GEN_ROOTFS_FILELIST) -filelist-tee-common: optee-client xtest helloworld +filelist-tee-common: optee-client xtest optee-examples @echo "# filelist-tee-common /start" > $(fl) @echo "dir /lib/optee_armtz 755 0 0" >> $(fl) + @if [ -e $(OPTEE_EXAMPLES_PATH)/out/ca ]; then \ + for file in $(OPTEE_EXAMPLES_PATH)/out/ca/*; do \ + echo "file /usr/bin/$$(basename $$file)" \ + "$$file 755 0 0" >> $(fl); \ + done; \ + fi + @if [ -e $(OPTEE_EXAMPLES_PATH)/out/ta ]; then \ + for file in $(OPTEE_EXAMPLES_PATH)/out/ta/*; do \ + echo "file /lib/optee_armtz/$$(basename $$file)" \ + "$$example 755 0 0" >> $(fl); \ + done; \ + fi @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-abe2-0002a5d5c51b.ta" \ - "$(HELLOWORLD_PATH)/ta/8aaaf200-2450-11e4-abe2-0002a5d5c51b.ta" \ - "444 0 0" >> $(fl); \ - fi @if [ -e $(BENCHMARK_APP_PATH)/benchmark ]; then \ echo "file /bin/benchmark" \ "$(BENCHMARK_APP_PATH)/benchmark 755 0 0" >> $(fl); \ @@ -27,9 +27,9 @@ endif ################################################################################ # Targets ################################################################################ -all: arm-tf edk2 linux optee-os optee-client xtest helloworld +all: arm-tf edk2 linux optee-os optee-client xtest optee-examples clean: arm-tf-clean busybox-clean edk2-clean optee-os-clean \ - optee-client-clean + optee-client-clean optee-examples-clean -include toolchain.mk @@ -131,11 +131,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # Root FS @@ -60,11 +60,14 @@ PATCHES_PATH ?=$(ROOT)/patches_hikey ################################################################################ # Targets ################################################################################ -all: prepare arm-tf boot-img lloader nvme strace +all: prepare arm-tf boot-img lloader nvme strace optee-examples -clean: arm-tf-clean busybox-clean edk2-clean linux-clean optee-os-clean optee-client-clean xtest-clean helloworld-clean strace-clean update_rootfs-clean boot-img-clean lloader-clean grub-clean +clean: arm-tf-clean busybox-clean edk2-clean linux-clean optee-os-clean \ + optee-client-clean xtest-clean optee-examples-clean strace-clean \ + update_rootfs-clean boot-img-clean lloader-clean grub-clean -cleaner: clean prepare-cleaner busybox-cleaner linux-cleaner strace-cleaner nvme-cleaner grub-cleaner +cleaner: clean prepare-cleaner busybox-cleaner linux-cleaner strace-cleaner \ + nvme-cleaner grub-cleaner -include toolchain.mk @@ -216,11 +219,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # strace diff --git a/hikey_debian.mk b/hikey_debian.mk index c91d790..caa879e 100644 --- a/hikey_debian.mk +++ b/hikey_debian.mk @@ -88,11 +88,14 @@ DEBPKG_CONTROL_PATH ?= $(DEBPKG_PATH)/DEBIAN ################################################################################ # Targets ################################################################################ -all: arm-tf linux boot-img lloader system-img nvme deb +all: arm-tf linux boot-img lloader system-img nvme deb optee-examples -clean: arm-tf-clean edk2-clean linux-clean optee-os-clean optee-client-clean xtest-clean helloworld-clean boot-img-clean lloader-clean grub-clean +clean: arm-tf-clean edk2-clean linux-clean optee-os-clean optee-client-clean \ + xtest-clean boot-img-clean lloader-clean grub-clean \ + optee-examples-clean -cleaner: clean prepare-cleaner linux-cleaner nvme-cleaner system-img-cleaner grub-cleaner +cleaner: clean prepare-cleaner linux-cleaner nvme-cleaner \ + system-img-cleaner grub-cleaner -include toolchain.mk @@ -227,11 +230,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # grub @@ -353,7 +356,7 @@ Architecture: arm64 Depends: Maintainer: Joakim Bech <joakim.bech@linaro.org> Description: OP-TEE client binaries, test program and Trusted Applications - Package contains tee-supplicant, libtee.so, xtest, hello_world and a set of + Package contains tee-supplicant, libtee.so, xtest, optee-examples and a set of Trusted Applications. NOTE! This package should only be used for testing and development. endef @@ -361,19 +364,20 @@ endef export CONTROL_TEXT .PHONY: deb -deb: prepare xtest helloworld optee-client +deb: prepare xtest optee-examples optee-client @mkdir -p $(DEBPKG_BIN_PATH) && cd $(DEBPKG_BIN_PATH) && \ cp -f $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant . && \ - cp -f $(OPTEE_TEST_OUT_PATH)/xtest/xtest . && \ - cp -f $(HELLOWORLD_PATH)/host/hello_world . - + cp -f $(OPTEE_TEST_OUT_PATH)/xtest/xtest . + @if [ -e $(OPTEE_EXAMPLES_PATH)/out/ca ]; then \ + for example in $(OPTEE_EXAMPLES_PATH)/out/ca/*; do \ + cp -f $$example .; \ + done; \ + fi @mkdir -p $(DEBPKG_LIB_PATH) && cd $(DEBPKG_LIB_PATH) && \ cp $(OPTEE_CLIENT_EXPORT)/lib/libtee* . - @mkdir -p $(DEBPKG_TA_PATH) && cd $(DEBPKG_TA_PATH) && \ cp $(HELLOWORLD_PATH)/ta/*.ta . && \ find $(OPTEE_TEST_OUT_PATH)/ta -name "*.ta" -exec cp {} . \; - @mkdir -p $(DEBPKG_CONTROL_PATH) @echo "$$CONTROL_TEXT" > $(DEBPKG_CONTROL_PATH)/control @cd $(OUT_PATH) && dpkg-deb --build optee_$(OPTEE_PKG_VERSION) @@ -23,9 +23,10 @@ U-BOOT_BIN ?= $(U-BOOT_PATH)/u-boot.bin ################################################################################ # Targets ################################################################################ -all: arm-tf u-boot linux optee-os optee-client xtest helloworld update_rootfs +all: arm-tf u-boot linux optee-os optee-client xtest optee-examples \ + update_rootfs clean: arm-tf-clean busybox-clean u-boot-clean optee-os-clean \ - optee-client-clean + optee-client-clean optee-examples-clean -include toolchain.mk @@ -129,11 +130,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # Root FS diff --git a/mediatek.mk b/mediatek.mk index 1b5330d..57b4a23 100644 --- a/mediatek.mk +++ b/mediatek.mk @@ -21,10 +21,9 @@ ARM_TF_BIN ?= $(ARM_TF_PATH)/build/mt8173/debug/bl31.bin ################################################################################ # Targets ################################################################################ -all: arm-tf linux optee-os optee-client xtest helloworld +all: arm-tf linux optee-os optee-client xtest optee-examples clean: arm-tf-clean linux-clean busybox-clean optee-os-clean \ - optee-client-clean - + optee-client-clean optee-examples-clean -include toolchain.mk @@ -104,10 +103,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common -helloworld-clean: helloworld-clean-common +optee-examples: optee-examples-common + +optee-examples-clean: optee-examples-clean-common ################################################################################ # Root FS @@ -27,9 +27,10 @@ ifeq ($(CFG_TEE_BENCHMARK),y) all: benchmark-app clean: benchmark-app-clean endif -all: bios-qemu qemu soc-term +all: bios-qemu qemu soc-term optee-examples clean: bios-qemu-clean busybox-clean linux-clean optee-os-clean \ - optee-client-clean qemu-clean soc-term-clean check-clean + optee-client-clean qemu-clean soc-term-clean check-clean \ + optee-examples-clean -include toolchain.mk @@ -128,11 +129,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # benchmark @@ -32,10 +32,10 @@ ifeq ($(CFG_TEE_BENCHMARK),y) all: benchmark-app clean: benchmark-app-clean endif -all: arm-tf edk2 qemu soc-term linux strace update_rootfs +all: arm-tf edk2 qemu soc-term linux strace update_rootfs optee-examples clean: arm-tf-clean busybox-clean edk2-clean linux-clean \ optee-os-clean optee-client-clean qemu-clean \ - soc-term-clean check-clean strace-clean + soc-term-clean check-clean strace-clean optee-examples-clean -include toolchain.mk @@ -164,11 +164,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # strace @@ -61,10 +61,11 @@ ifeq ($(CFG_TEE_BENCHMARK),y) all: benchmark-app clean: benchmark-app-clean endif -all: rpi3-firmware arm-tf optee-os optee-client xtest u-boot u-boot-rpi-bin\ - linux update_rootfs -clean: arm-tf-clean busybox-clean u-boot-clean u-boot-rpi-bin-clean \ - optee-os-clean optee-client-clean rpi3-firmware-clean head-bin-clean +all: rpi3-firmware arm-tf optee-os optee-client xtest u-boot u-boot-jtag-bin\ + linux update_rootfs optee-examples +clean: arm-tf-clean busybox-clean u-boot-clean u-boot-jtag-bin-clean \ + optee-os-clean optee-client-clean rpi3-firmware-clean head-bin-clean \ + optee-examples-clean -include toolchain.mk @@ -235,11 +236,11 @@ xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common ################################################################################ -# hello_world +# Sample applications / optee_examples ################################################################################ -helloworld: helloworld-common +optee-examples: optee-examples-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ################################################################################ # benchmark diff --git a/ti/ti-common.mk b/ti/ti-common.mk index 6b3b936..89387fa 100644 --- a/ti/ti-common.mk +++ b/ti/ti-common.mk @@ -3,8 +3,10 @@ ############################################################################### .PHONY: all clean cleaner prepare -all: u-boot linux optee-os optee-client xtest helloworld build-fit update_rootfs -clean: linux-clean busybox-clean u-boot-clean optee-os-clean optee-client-clean build-fit-clean +all: u-boot linux optee-os optee-client xtest build-fit \ + update_rootfs optee-examples +clean: linux-clean busybox-clean u-boot-clean optee-os-clean \ + optee-client-clean build-fit-clean optee-examples-clean cleaner: clean prepare-cleaner busybox-cleaner linux-cleaner -include toolchain.mk @@ -73,13 +75,12 @@ xtest: xtest-common xtest-clean: xtest-clean-common xtest-patch: xtest-patch-common -############################################################################### -# hello_world -############################################################################### -.PHONY: helloworld helloworld-clean +################################################################################ +# Sample applications / optee_examples +################################################################################ +optee-examples: optee-examples-common -helloworld: helloworld-common -helloworld-clean: helloworld-clean-common +optee-examples-clean: optee-examples-clean-common ############################################################################### # Busybox |