summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Drysdale <drysdale@google.com>2022-12-05 12:40:07 +0000
committerDavid Drysdale <drysdale@google.com>2023-01-04 16:15:52 +0000
commit626f39f3a0a94ef1238594a6fc95d5da3053681b (patch)
tree2e178abce1d33f513aba17a3ad231c42c9d8a27a
parent11ac359d69b948cf8e1917df18a14aebf15352e3 (diff)
downloadgeneric-arm64-626f39f3a0a94ef1238594a6fc95d5da3053681b.tar.gz
Allow selection of KeyMint TA implementation
Bug: 225036046 Change-Id: Ib67ec467c1b7b07b60ca95b1eced6757e303a1ed
-rw-r--r--project/generic-arm-inc.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/project/generic-arm-inc.mk b/project/generic-arm-inc.mk
index e0cc117..76907d7 100644
--- a/project/generic-arm-inc.mk
+++ b/project/generic-arm-inc.mk
@@ -108,6 +108,19 @@ ifneq (true,$(call TOBOOL,$(USER_SCS_ENABLED)))
USER_STACK_PROTECTOR ?= true
endif
+# Allow the KeyMint TA implementation to be selected at build time. This needs to be
+# done in sync with the HAL service implementation included in Android. Possible values are:
+#
+# - Rust implementation: export TRUSTY_KEYMINT_IMPL=rust
+# - C++ implementation: (any other value of TRUSTY_KEYMINT_IMPL)
+
+ifeq ($(TRUSTY_KEYMINT_IMPL),rust)
+ TRUSTY_KEYMINT_USER_TASK := trusty/user/app/keymint/app
+else
+ # Default to the C++ implementation
+ TRUSTY_KEYMINT_USER_TASK := trusty/user/app/keymaster
+endif
+
#
# Modules to be compiled into lk.bin
#
@@ -146,8 +159,7 @@ TRUSTY_BUILTIN_USER_TASKS := \
trusty/user/app/cast-auth/app \
trusty/user/app/confirmationui \
trusty/user/app/gatekeeper \
- trusty/user/app/keymaster \
- trusty/user/app/keymint/app \
+ $(TRUSTY_KEYMINT_USER_TASK) \
trusty/user/app/sample/hwaes \
trusty/user/app/sample/hwbcc \
trusty/user/app/sample/hwcrypto \