1# 2# Copyright (C) 2024 The Android Open-Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17# 18# This makefile should be included by devices that use Trusty TEE 19# to pull in a set of Trusty KeyMint specific modules. 20# 21# Allow KeyMint HAL service implementation selection at build time. This must be 22# synchronized with the TA implementation included in Trusty. Possible values: 23# 24# - Rust implementation for Trusty TEE 25# export TRUSTY_KEYMINT_IMPL=rust 26# - C++ implementation (default): 27# any other value or unset TRUSTY_KEYMINT_IMPL 28 29ifeq ($(TRUSTY_KEYMINT_IMPL),rust) 30 LOCAL_KEYMINT_PRODUCT_PACKAGE := android.hardware.security.keymint-service.rust.trusty 31 32else 33 # Default to the C++ implementation 34 LOCAL_KEYMINT_PRODUCT_PACKAGE := android.hardware.security.keymint-service.trusty 35endif 36 37PRODUCT_PACKAGES += \ 38 $(LOCAL_KEYMINT_PRODUCT_PACKAGE) \ 39