optee-test.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. ################################################################################
  2. #
  3. # optee-test
  4. #
  5. ################################################################################
  6. OPTEE_TEST_VERSION = 3.11.0
  7. OPTEE_TEST_SITE = $(call github,OP-TEE,optee_test,$(OPTEE_TEST_VERSION))
  8. OPTEE_TEST_LICENSE = GPL-2.0, BSD-2-Clause,
  9. OPTEE_TEST_LICENSE_FILES = LICENSE.md
  10. OPTEE_TEST_DEPENDENCIES = optee-client optee-os
  11. OPTEE_TEST_CONF_OPTS = -DOPTEE_TEST_SDK=$(OPTEE_OS_SDK)
  12. # Trusted Application are not built from CMake due to ta_dev_kit
  13. # dependencies. We must build and install them on target.
  14. define OPTEE_TEST_BUILD_TAS
  15. $(foreach f,$(wildcard $(@D)/ta/*_lib/Makefile) $(wildcard $(@D)/ta/*/Makefile), \
  16. $(TARGET_CONFIGURE_OPTS) \
  17. $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
  18. TA_DEV_KIT_DIR=$(OPTEE_OS_SDK) \
  19. -C $(dir $f) all
  20. )
  21. endef
  22. define OPTEE_TEST_INSTALL_TAS
  23. @mkdir -p $(TARGET_DIR)/lib/optee_armtz
  24. @$(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz $(@D)/ta/*/*.ta
  25. endef
  26. OPTEE_TEST_POST_BUILD_HOOKS += OPTEE_TEST_BUILD_TAS
  27. OPTEE_TEST_POST_INSTALL_TARGET_HOOKS += OPTEE_TEST_INSTALL_TAS
  28. $(eval $(cmake-package))