|
| 1 | +# Copyright (c) 2023 Project CHIP Authors |
| 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 | +import("//build_overrides/chip.gni") |
| 16 | + |
| 17 | +config("libele_config") { |
| 18 | + ELE_ROM = 1 |
| 19 | + ELE_FMW = 2 |
| 20 | + |
| 21 | + ELE_MAJOR_VER = 1 |
| 22 | + ELE_MINOR_VER = 0 |
| 23 | + |
| 24 | + defines = [ |
| 25 | + "LIB_MAJOR_VERSION=${ELE_MAJOR_VER}", |
| 26 | + "LIB_MINOR_VERSION=${ELE_MINOR_VER}", |
| 27 | + |
| 28 | + "CONFIG_PLAT_ELE=1", |
| 29 | + "PLAT_ELE_FEAT_NOT_SUPPORTED=0", |
| 30 | + "PSA_COMPLIANT=1", |
| 31 | + "SECONDARY_API_SUPPORTED=1", |
| 32 | + |
| 33 | + "MT_SAB_SIGN_GEN=${ELE_FMW}", |
| 34 | + "MT_SAB_VERIFY_SIGN=${ELE_FMW}", |
| 35 | + "MT_SAB_KEY_GENERATE=${ELE_FMW}", |
| 36 | + "MT_SAB_MANAGE_KEY_GROUP=${ELE_FMW}", |
| 37 | + "MT_SAB_IMPORT_KEY=${ELE_FMW}", |
| 38 | + "MT_SAB_DELETE_KEY=${ELE_FMW}", |
| 39 | + "MT_SAB_GET_KEY_ATTR=${ELE_FMW}", |
| 40 | + "MT_SAB_HASH_GEN=${ELE_FMW}", |
| 41 | + "MT_SAB_CIPHER=${ELE_FMW}", |
| 42 | + "MT_SAB_SESSION=${ELE_FMW}", |
| 43 | + "MT_SAB_KEY_STORE=${ELE_FMW}", |
| 44 | + "MT_SAB_KEY_STORE_REPROV_EN=${ELE_FMW}", |
| 45 | + "MT_SAB_KEY_MANAGEMENT=${ELE_FMW}", |
| 46 | + "MT_SAB_MAC=${ELE_FMW}", |
| 47 | + "MT_SAB_RNG=${ELE_FMW}", |
| 48 | + "MT_SAB_KEY_RECOVERY=${ELE_FMW}", |
| 49 | + "MT_SAB_GET_INFO=${ELE_FMW}", |
| 50 | + "MT_SAB_AUTH_ENC=${ELE_FMW}", |
| 51 | + "MT_SAB_AUTH_ENC_NEW=${ELE_FMW}", |
| 52 | + "MT_SAB_DATA_STORAGE=${ELE_FMW}", |
| 53 | + "MT_SAB_DATA_STORAGE_DELETE=${ELE_FMW}", |
| 54 | + "MT_SAB_DEBUG_DUMP=${ELE_ROM}", |
| 55 | + "MT_SAB_DEV_ATTEST=${ELE_ROM}", |
| 56 | + "MT_SAB_DEV_GETINFO=${ELE_ROM}", |
| 57 | + "MT_SAB_LC_UPDATE=${ELE_ROM}", |
| 58 | + "MT_SAB_STORAGE_MASTER_IMPORT=${ELE_FMW}", |
| 59 | + "MT_SAB_STORAGE_MASTER_EXPORT_REQ=${ELE_FMW}", |
| 60 | + "MT_SAB_STORAGE_EXPORT_FINISH_REQ=${ELE_FMW}", |
| 61 | + "MT_SAB_STORAGE_CHUNK_GET_REQ=${ELE_FMW}", |
| 62 | + "MT_SAB_STORAGE_CHUNK_GET_DONE_REQ=${ELE_FMW}", |
| 63 | + "MT_SAB_STORAGE_CHUNK_EXPORT_REQ=${ELE_FMW}", |
| 64 | + "MT_SAB_STORAGE_OPEN=${ELE_FMW}", |
| 65 | + "MT_SAB_STORAGE_CLOSE=${ELE_FMW}", |
| 66 | + "MT_SAB_STORAGE_KEY_DB_REQ=${ELE_FMW}", |
| 67 | + "MT_SAB_ENC_DATA_STORAGE=${ELE_FMW}", |
| 68 | + |
| 69 | + "HSM_SIGN_GEN=1", |
| 70 | + "HSM_VERIFY_SIGN=1", |
| 71 | + "HSM_KEY_GENERATE=1", |
| 72 | + "HSM_MANAGE_KEY_GROUP=1", |
| 73 | + "HSM_IMPORT_KEY=1", |
| 74 | + "HSM_DELETE_KEY=1", |
| 75 | + "HSM_GET_KEY_ATTR=1", |
| 76 | + "HSM_HASH_GEN=1", |
| 77 | + "HSM_CIPHER=1", |
| 78 | + "HSM_SESSION=1", |
| 79 | + "HSM_KEY_STORE=1", |
| 80 | + "HSM_KEY_MANAGEMENT=1", |
| 81 | + "HSM_MAC=1", |
| 82 | + "HSM_RNG=1", |
| 83 | + "HSM_KEY_RECOVERY=1", |
| 84 | + "HSM_GET_INFO=1", |
| 85 | + "HSM_AUTH_ENC=1", |
| 86 | + "HSM_DATA_STORAGE=1", |
| 87 | + "HSM_DEBUG_DUMP=1", |
| 88 | + "HSM_DEV_ATTEST=1", |
| 89 | + "HSM_DEV_GETINFO=1", |
| 90 | + "HSM_LC_UPDATE=1", |
| 91 | + "HSM_ENC_DATA_STORAGE=1", |
| 92 | + ] |
| 93 | + |
| 94 | + include_dirs = [ |
| 95 | + "repo/src/plat/ele/include", |
| 96 | + "repo/src/common/include", |
| 97 | + "repo/src/common/sab_msg/include", |
| 98 | + "repo/include", |
| 99 | + "repo/include/common", |
| 100 | + "repo/include/hsm", |
| 101 | + "repo/include/she", |
| 102 | + ] |
| 103 | +} |
| 104 | + |
| 105 | +source_set("libelematter") { |
| 106 | + ELE_PLAT_PATH = "src/plat/ele" |
| 107 | + ELE_PLAT_COMMON_PATH = "src/common" |
| 108 | + |
| 109 | + sources = [ |
| 110 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_auth_enc.c", |
| 111 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_cipher.c", |
| 112 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_data_storage.c", |
| 113 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_debug_dump.c", |
| 114 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_delete_key.c", |
| 115 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_dev_attest.c", |
| 116 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_dev_getinfo.c", |
| 117 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_get_info.c", |
| 118 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_get_key_attr.c", |
| 119 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_handle.c", |
| 120 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_hash.c", |
| 121 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_importkey.c", |
| 122 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_key_generate.c", |
| 123 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_key_management.c", |
| 124 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_key_recovery.c", |
| 125 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_key_store.c", |
| 126 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_lc_update.c", |
| 127 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_mac.c", |
| 128 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_manage_key_group.c", |
| 129 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_rng.c", |
| 130 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_session.c", |
| 131 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_sign_gen.c", |
| 132 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_utils.c", |
| 133 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_api/hsm_verify_sign.c", |
| 134 | + "repo/${ELE_PLAT_COMMON_PATH}/hsm_lib.c", |
| 135 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_common_err.c", |
| 136 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_messaging.c", |
| 137 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_auth_enc.c", |
| 138 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_cipher.c", |
| 139 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_data_storage.c", |
| 140 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_debug_dump.c", |
| 141 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_delete_key.c", |
| 142 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_dev_attest.c", |
| 143 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_dev_getinfo.c", |
| 144 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_get_info.c", |
| 145 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_get_key_attr.c", |
| 146 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_hash.c", |
| 147 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_import_key.c", |
| 148 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_init_proc_msg.c", |
| 149 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_key_generate.c", |
| 150 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_key_management.c", |
| 151 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_key_recovery.c", |
| 152 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_key_store.c", |
| 153 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_lc_update.c", |
| 154 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_mac.c", |
| 155 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_manage_key_group.c", |
| 156 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_process_msg.c", |
| 157 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_rng.c", |
| 158 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_session.c", |
| 159 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_sign_gen.c", |
| 160 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_chunk_export.c", |
| 161 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_close.c", |
| 162 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_export_finish.c", |
| 163 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_get_chunk.c", |
| 164 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_get_chunk_done.c", |
| 165 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_key_db.c", |
| 166 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_master_export.c", |
| 167 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_master_import.c", |
| 168 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_storage_open.c", |
| 169 | + "repo/${ELE_PLAT_COMMON_PATH}/sab_msg/sab_verify_sign.c", |
| 170 | + "repo/${ELE_PLAT_COMMON_PATH}/se_global_info.c", |
| 171 | + "repo/${ELE_PLAT_PATH}/ele_os_abs_linux.c", |
| 172 | + "repo/${ELE_PLAT_PATH}/ele_utils.c", |
| 173 | + "repo/${ELE_PLAT_PATH}/plat_err.c", |
| 174 | + ] |
| 175 | + |
| 176 | + public_configs = [ ":libele_config" ] |
| 177 | +} |
0 commit comments