Raef Coles | a1f504c | 2020-07-10 09:58:55 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Kevin Peng | a2b6802 | 2023-01-13 13:54:05 +0800 | [diff] [blame] | 2 | # Copyright (c) 2020-2023, Arm Limited. All rights reserved. |
BohdanHunko | f871df0 | 2023-02-03 14:36:41 +0200 | [diff] [blame] | 3 | # Copyright (c) 2022-2023 Cypress Semiconductor Corporation (an Infineon company) |
Chris Brand | cae2026 | 2022-06-23 12:05:33 -0700 | [diff] [blame] | 4 | # or an affiliate of Cypress Semiconductor Corporation. All rights reserved. |
Raef Coles | a1f504c | 2020-07-10 09:58:55 +0100 | [diff] [blame] | 5 | # |
| 6 | # SPDX-License-Identifier: BSD-3-Clause |
| 7 | # |
| 8 | #------------------------------------------------------------------------------- |
| 9 | |
Raef Coles | a1f504c | 2020-07-10 09:58:55 +0100 | [diff] [blame] | 10 | install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/ |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 11 | DESTINATION outputs |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 12 | ) |
| 13 | |
| 14 | set(INTERFACE_INC_DIR ${CMAKE_SOURCE_DIR}/interface/include) |
| 15 | set(INTERFACE_SRC_DIR ${CMAKE_SOURCE_DIR}/interface/src) |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 16 | |
| 17 | set(INSTALL_INTERFACE_INC_DIR ${TFM_INSTALL_PATH}/interface/include) |
| 18 | set(INSTALL_INTERFACE_SRC_DIR ${TFM_INSTALL_PATH}/interface/src) |
| 19 | set(INSTALL_INTERFACE_LIB_DIR ${TFM_INSTALL_PATH}/interface/lib) |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 20 | set(INSTALL_PLATFORM_NS_DIR ${TFM_INSTALL_PATH}/platform) |
| 21 | set(INSTALL_CMAKE_DIR ${TFM_INSTALL_PATH}/cmake) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 22 | |
David Hu | b24aead | 2020-10-17 19:46:19 +0800 | [diff] [blame] | 23 | # export veneer lib |
Chris Brand | ca81902 | 2022-07-19 09:25:15 -0700 | [diff] [blame] | 24 | if (CONFIG_TFM_USE_TRUSTZONE) |
Raef Coles | 25fc175 | 2020-11-24 12:04:42 +0000 | [diff] [blame] | 25 | install(FILES ${CMAKE_BINARY_DIR}/secure_fw/s_veneers.o |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 26 | DESTINATION ${INSTALL_INTERFACE_LIB_DIR}) |
David Hu | b24aead | 2020-10-17 19:46:19 +0800 | [diff] [blame] | 27 | endif() |
| 28 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 29 | ####################### export headers ######################################### |
| 30 | |
| 31 | install(FILES ${INTERFACE_INC_DIR}/psa/client.h |
| 32 | ${INTERFACE_INC_DIR}/psa/error.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 33 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 34 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 35 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa_manifest/sid.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 36 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa_manifest) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 37 | |
Kevin Peng | 0e340ea | 2023-08-15 17:51:44 +0800 | [diff] [blame] | 38 | install(FILES ${INTERFACE_INC_DIR}/tfm_veneers.h |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 39 | ${INTERFACE_INC_DIR}/tfm_ns_interface.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 40 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 41 | |
Sherry Zhnag | 482b88b | 2021-08-19 17:51:47 +0800 | [diff] [blame] | 42 | install(FILES ${INTERFACE_INC_DIR}/tfm_ns_client_ext.h |
| 43 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 44 | |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 45 | install(FILES ${CMAKE_SOURCE_DIR}/secure_fw/include/config_tfm.h |
| 46 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
David Hu | 6d1a9b6 | 2023-02-22 16:54:04 +0800 | [diff] [blame] | 47 | install(FILES ${CMAKE_SOURCE_DIR}/config/config_base.h |
| 48 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 49 | |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 50 | install(FILES ${INTERFACE_INC_DIR}/tfm_psa_call_pack.h |
| 51 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 52 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa/framework_feature.h |
| 53 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Xinyu Zhang | 93899d0 | 2021-05-11 10:48:52 +0800 | [diff] [blame] | 54 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 55 | if (TFM_PARTITION_NS_AGENT_MAILBOX) |
David Hu | 04969a4 | 2020-06-14 21:25:35 +0800 | [diff] [blame] | 56 | install(FILES ${INTERFACE_INC_DIR}/multi_core/tfm_multi_core_api.h |
| 57 | ${INTERFACE_INC_DIR}/multi_core/tfm_ns_mailbox.h |
| 58 | ${INTERFACE_INC_DIR}/multi_core/tfm_mailbox.h |
David Hu | cb91581 | 2021-12-27 14:22:04 +0800 | [diff] [blame] | 59 | ${INTERFACE_INC_DIR}/multi_core/tfm_ns_mailbox_test.h |
David Hu | 186a129 | 2021-09-13 09:05:52 +0800 | [diff] [blame] | 60 | ${CMAKE_BINARY_DIR}/generated/interface/include/tfm_mailbox_config.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 61 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 62 | endif() |
| 63 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 64 | if (TFM_PARTITION_PROTECTED_STORAGE) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 65 | install(FILES ${INTERFACE_INC_DIR}/psa/protected_storage.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 66 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 67 | install(FILES ${INTERFACE_INC_DIR}/tfm_ps_defs.h |
| 68 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 69 | endif() |
| 70 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 71 | if (TFM_PARTITION_INTERNAL_TRUSTED_STORAGE) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 72 | install(FILES ${INTERFACE_INC_DIR}/psa/internal_trusted_storage.h |
| 73 | ${INTERFACE_INC_DIR}/psa/storage_common.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 74 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 75 | install(FILES ${INTERFACE_INC_DIR}/tfm_its_defs.h |
| 76 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 77 | endif() |
| 78 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 79 | if (TFM_PARTITION_CRYPTO) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 80 | install(FILES ${INTERFACE_INC_DIR}/psa/crypto_extra.h |
| 81 | ${INTERFACE_INC_DIR}/psa/crypto_compat.h |
| 82 | ${INTERFACE_INC_DIR}/psa/crypto.h |
| 83 | ${INTERFACE_INC_DIR}/psa/crypto_client_struct.h |
Xinyu Zhang | fce2037 | 2023-04-10 14:43:47 +0800 | [diff] [blame] | 84 | ${INTERFACE_INC_DIR}/psa/crypto_platform.h |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 85 | ${INTERFACE_INC_DIR}/psa/crypto_sizes.h |
| 86 | ${INTERFACE_INC_DIR}/psa/crypto_struct.h |
| 87 | ${INTERFACE_INC_DIR}/psa/crypto_types.h |
| 88 | ${INTERFACE_INC_DIR}/psa/crypto_values.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 89 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 90 | install(FILES ${INTERFACE_INC_DIR}/tfm_crypto_defs.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 91 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 92 | endif() |
| 93 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 94 | if (TFM_PARTITION_INITIAL_ATTESTATION) |
David Hu | 9191b61 | 2023-06-08 12:02:39 +0800 | [diff] [blame] | 95 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa/initial_attestation.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 96 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 97 | install(FILES ${INTERFACE_INC_DIR}/tfm_attest_defs.h |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 98 | ${INTERFACE_INC_DIR}/tfm_attest_iat_defs.h |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 99 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 100 | endif() |
| 101 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 102 | if(TFM_PARTITION_PLATFORM) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 103 | install(FILES ${INTERFACE_INC_DIR}/tfm_platform_api.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 104 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 105 | endif() |
| 106 | |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 107 | if(TFM_PARTITION_FIRMWARE_UPDATE) |
| 108 | install(FILES ${INTERFACE_INC_DIR}/psa/update.h |
Sherry Zhang | 73126e5 | 2022-02-15 14:27:49 +0800 | [diff] [blame] | 109 | ${CMAKE_BINARY_DIR}/generated/interface/include/psa/fwu_config.h |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 110 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
| 111 | install(FILES ${INTERFACE_INC_DIR}/tfm_fwu_defs.h |
| 112 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 113 | endif() |
| 114 | |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 115 | if(PLATFORM_DEFAULT_CRYPTO_KEYS) |
| 116 | install(DIRECTORY ${INTERFACE_INC_DIR}/crypto_keys |
| 117 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 118 | endif() |
| 119 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 120 | ####################### export sources ######################################### |
| 121 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 122 | if (TFM_PARTITION_NS_AGENT_MAILBOX) |
David Hu | 04969a4 | 2020-06-14 21:25:35 +0800 | [diff] [blame] | 123 | install(FILES ${INTERFACE_SRC_DIR}/multi_core/tfm_ns_mailbox.c |
| 124 | ${INTERFACE_SRC_DIR}/multi_core/tfm_multi_core_ns_api.c |
| 125 | ${INTERFACE_SRC_DIR}/multi_core/tfm_multi_core_psa_ns_api.c |
David Hu | d597345 | 2020-11-26 16:47:46 +0800 | [diff] [blame] | 126 | ${INTERFACE_SRC_DIR}/multi_core/tfm_ns_mailbox_thread.c |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 127 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}/multi_core) |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 128 | endif() |
David Hu | f07f3f1 | 2021-04-06 18:03:33 +0800 | [diff] [blame] | 129 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 130 | if (TFM_PARTITION_NS_AGENT_TZ) |
| 131 | install(FILES ${INTERFACE_SRC_DIR}/tfm_psa_ns_api.c |
| 132 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
| 133 | endif() |
| 134 | |
BohdanHunko | f871df0 | 2023-02-03 14:36:41 +0200 | [diff] [blame] | 135 | install(DIRECTORY ${INTERFACE_INC_DIR}/os_wrapper |
| 136 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 137 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 138 | if (CONFIG_TFM_USE_TRUSTZONE) |
BohdanHunko | f871df0 | 2023-02-03 14:36:41 +0200 | [diff] [blame] | 139 | install(DIRECTORY ${INTERFACE_SRC_DIR}/os_wrapper |
David Hu | f07f3f1 | 2021-04-06 18:03:33 +0800 | [diff] [blame] | 140 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 141 | endif() |
| 142 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 143 | if (TFM_PARTITION_PROTECTED_STORAGE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 144 | install(FILES ${INTERFACE_SRC_DIR}/tfm_ps_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 145 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 146 | endif() |
| 147 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 148 | if (TFM_PARTITION_INTERNAL_TRUSTED_STORAGE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 149 | install(FILES ${INTERFACE_SRC_DIR}/tfm_its_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 150 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 151 | endif() |
| 152 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 153 | if (TFM_PARTITION_CRYPTO) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 154 | install(FILES ${INTERFACE_SRC_DIR}/tfm_crypto_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 155 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 156 | endif() |
| 157 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 158 | if (TFM_PARTITION_INITIAL_ATTESTATION) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 159 | install(FILES ${INTERFACE_SRC_DIR}/tfm_attest_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 160 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 161 | endif() |
| 162 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 163 | if(TFM_PARTITION_PLATFORM) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 164 | install(FILES ${INTERFACE_SRC_DIR}/tfm_platform_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 165 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 166 | endif() |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 167 | |
| 168 | |
| 169 | ##################### Export image signing information ######################### |
| 170 | |
Alamy Liu | 2c13c03 | 2021-01-20 09:55:50 -0800 | [diff] [blame] | 171 | set(INSTALL_IMAGE_SIGNING_DIR ${TFM_INSTALL_PATH}/image_signing) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 172 | |
| 173 | if(BL2) |
| 174 | install(DIRECTORY bl2/ext/mcuboot/scripts |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 175 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR} |
| 176 | PATTERN "scripts/*.py" |
| 177 | PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ |
| 178 | GROUP_EXECUTE GROUP_READ |
| 179 | PATTERN "scripts/wrapper/*.py" |
| 180 | PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ |
| 181 | GROUP_EXECUTE GROUP_READ) |
| 182 | |
| 183 | install(DIRECTORY ${MCUBOOT_PATH}/scripts/imgtool |
| 184 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/scripts) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 185 | |
| 186 | if (MCUBOOT_ENC_IMAGES) |
| 187 | install(FILES ${MCUBOOT_KEY_ENC} |
Alamy Liu | 2c13c03 | 2021-01-20 09:55:50 -0800 | [diff] [blame] | 188 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 189 | endif() |
| 190 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 191 | # unconditionally install all necessary files for optional signing |
| 192 | install(FILES $<TARGET_OBJECTS:signing_layout_s> |
| 193 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/layout_files) |
| 194 | |
| 195 | if(MCUBOOT_IMAGE_NUMBER GREATER 1) |
| 196 | install(FILES $<TARGET_OBJECTS:signing_layout_ns> |
| 197 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/layout_files) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 198 | endif() |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 199 | |
| 200 | install(FILES ${MCUBOOT_KEY_NS} ${MCUBOOT_KEY_S} |
| 201 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 202 | endif() |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 203 | |
| 204 | if(TFM_PARTITION_FIRMWARE_UPDATE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 205 | install(FILES ${INTERFACE_SRC_DIR}/tfm_fwu_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 206 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 207 | endif() |
Chris Brand | 9edf081 | 2022-07-05 14:18:42 -0700 | [diff] [blame] | 208 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 209 | ###################### Install NS platform sources ############################# |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 210 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 211 | install(CODE "MESSAGE(\"----- Installing platform NS -----\")") |
| 212 | |
| 213 | install(FILES ${PLATFORM_DIR}/ext/common/gcc/tfm_common_ns.ld |
| 214 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}) |
| 215 | |
| 216 | install(FILES ${PLATFORM_DIR}/ext/common/armclang/tfm_common_ns.sct |
| 217 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}) |
| 218 | |
| 219 | install(FILES ${PLATFORM_DIR}/ext/common/iar/tfm_common_ns.icf |
| 220 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}) |
| 221 | |
| 222 | install(DIRECTORY ${PLATFORM_DIR}/ext/cmsis |
| 223 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}) |
| 224 | |
| 225 | install(FILES ${CMAKE_SOURCE_DIR}/cmake/spe-CMakeLists.cmake |
| 226 | DESTINATION ${TFM_INSTALL_PATH} |
| 227 | RENAME CMakeLists.txt) |
| 228 | |
| 229 | install(FILES ${PLATFORM_DIR}/ns/toolchain_ns_GNUARM.cmake |
| 230 | DESTINATION ${INSTALL_CMAKE_DIR}) |
| 231 | |
| 232 | # copy all files from active platform directory |
| 233 | install(DIRECTORY ${TARGET_PLATFORM_PATH}/ns/ |
| 234 | DESTINATION ${INSTALL_PLATFORM_NS_DIR} OPTIONAL) |
| 235 | |
| 236 | # Export platform abilities |
| 237 | install(FILES ${TARGET_PLATFORM_PATH}/config.cmake |
| 238 | DESTINATION ${INSTALL_PLATFORM_NS_DIR} OPTIONAL) |
| 239 | |
| 240 | install(FILES |
| 241 | ${CMAKE_SOURCE_DIR}/lib/fih/inc/fih.h |
| 242 | ${PLATFORM_DIR}/include/tfm_plat_ns.h |
| 243 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}/include) |
| 244 | |
| 245 | if (TARGET psa_crypto_config) |
| 246 | # FIXIT: This is a temporal patch to reduce the change scope and simplify review. |
| 247 | # In the future we shall decouple this target from tfm_config becuase |
| 248 | # "psa_crypto_config" target exists not in all configurations. |
| 249 | # Functionally "psa_crypto_config" provides only include path for Crypto accelerator. |
| 250 | install(TARGETS tfm_config psa_crypto_config psa_interface |
| 251 | DESTINATION ${TFM_INSTALL_PATH} |
| 252 | EXPORT tfm-config |
| 253 | ) |
| 254 | else() |
| 255 | install(TARGETS tfm_config psa_interface |
| 256 | DESTINATION ${TFM_INSTALL_PATH} |
| 257 | EXPORT tfm-config |
| 258 | ) |
| 259 | endif() |
| 260 | |
| 261 | target_include_directories(psa_interface |
| 262 | INTERFACE |
| 263 | $<INSTALL_INTERFACE:interface/include> |
| 264 | ) |
| 265 | |
| 266 | install(EXPORT tfm-config |
| 267 | FILE spe_export.cmake |
| 268 | DESTINATION ${INSTALL_CMAKE_DIR}) |
| 269 | |
| 270 | configure_file(${CMAKE_SOURCE_DIR}/config/spe_config.cmake.in |
| 271 | ${INSTALL_CMAKE_DIR}/spe_config.cmake @ONLY) |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 272 | |
Chris Brand | 9edf081 | 2022-07-05 14:18:42 -0700 | [diff] [blame] | 273 | ##################### Platform-specific installation ########################### |
Kevin Peng | 174f836 | 2023-04-07 11:32:16 +0800 | [diff] [blame] | 274 | include(${TARGET_PLATFORM_PATH}/install.cmake OPTIONAL) |