1// Copyright (C) 2020 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16// The original Work has been changed by NXP. 17// 18// Licensed under the Apache License, Version 2.0 (the "License"); 19// you may not use this file except in compliance with the License. 20// You may obtain a copy of the License at 21// 22// http://www.apache.org/licenses/LICENSE-2.0 23// 24// Unless required by applicable law or agreed to in writing, software 25// distributed under the License is distributed on an "AS IS" BASIS, 26// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 27// See the License for the specific language governing permissions and 28// limitations under the License. 29// 30// Copyright 2022-2024 NXP 31// 32 33package { 34 default_applicable_licenses: [ 35 "//hardware/nxp/keymint:hardware_nxp_keymint_license", 36 ], 37} 38 39cc_library { 40 name: "libjc_keymint3.nxp", 41 defaults: [ 42 "keymaster_defaults", 43 ], 44 srcs: [ 45 "CborConverter.cpp", 46 "JavacardKeyMintDevice.cpp", 47 "JavacardKeyMintOperation.cpp", 48 "JavacardRemotelyProvisionedComponentDevice.cpp", 49 "JavacardSecureElement.cpp", 50 "JavacardSharedSecret.cpp", 51 "keymint_utils.cpp", 52 ], 53 cflags: [ 54 "-O0", 55 "-DNXP_EXTNS", 56 //"-DINIT_USING_SEHAL_TRANSPORT", 57 ], 58 shared_libs: [ 59 "android.hardware.security.rkp-V3-ndk", 60 "android.hardware.security.secureclock-V1-ndk", 61 "android.hardware.security.sharedsecret-V1-ndk", 62 "lib_android_keymaster_keymint_utils_V3", 63 "libbase", 64 "libbinder", 65 "libcppbor", 66 "libkeymaster_portable", 67 "libkeymaster_messages", 68 "libsoft_attestation_cert", 69 "liblog", 70 "libcrypto", 71 "libcutils", 72 "libutils", 73 "libjc_keymint_transport.nxp", 74 "libbinder_ndk", 75 "libmemunreachable", 76 "android.hardware.security.keymint-V3-ndk", 77 "android.hardware.secure_element-V1-ndk", 78 ], 79 export_include_dirs: [ 80 ".", 81 ], 82 product_variables: { 83 debuggable: { 84 cflags: ["-DDCHECK_ALWAYS_ON"], 85 }, 86 }, 87 vendor_available: true, 88} 89 90cc_binary { 91 name: "android.hardware.security.keymint3-service.strongbox.nxp", 92 relative_install_path: "hw", 93 init_rc: ["android.hardware.security.keymint3-service.strongbox.nxp.rc"], 94 vintf_fragments: [ 95 "android.hardware.security.keymint3-service.strongbox.nxp.xml", 96 "android.hardware.security.sharedsecret3-service.strongbox.nxp.xml", 97 ], 98 vendor: true, 99 cflags: [ 100 "-Wall", 101 "-Wextra", 102 "-DOMAPI_TRANSPORT", 103 "-DNXP_EXTNS", 104 ], 105 shared_libs: [ 106 "android.hardware.security.rkp-V3-ndk", 107 "android.hardware.security.sharedsecret-V1-ndk", 108 "lib_android_keymaster_keymint_utils_V3", 109 "android.se.omapi-V1-ndk", 110 "libbase", 111 "libbinder_ndk", 112 "libcppbor", 113 "libcrypto", 114 "libkeymaster_portable", 115 "libjc_keymint3.nxp", 116 "libjc_keymint_transport.nxp", 117 "liblog", 118 "libutils", 119 "libhidlbase", 120 "android.hardware.security.keymint-V3-ndk", 121 "android.hardware.secure_element-V1-ndk", 122 ], 123 srcs: [ 124 "service.cpp", 125 ], 126 required: [ 127 "android.hardware.hardware_keystore.jc-strongbox-keymint3.nxp.xml", 128 ], 129} 130 131prebuilt_etc { 132 name: "android.hardware.hardware_keystore.jc-strongbox-keymint3.nxp.xml", 133 sub_dir: "permissions", 134 vendor: true, 135 src: "android.hardware.hardware_keystore.jc-strongbox-keymint3.nxp.xml", 136} 137