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 | 3dd9863 | 2023-09-20 16:26:30 +0100 | [diff] [blame] | 11 | DESTINATION bin |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 12 | ) |
| 13 | |
David Hu | b24aead | 2020-10-17 19:46:19 +0800 | [diff] [blame] | 14 | # export veneer lib |
Chris Brand | ca81902 | 2022-07-19 09:25:15 -0700 | [diff] [blame] | 15 | if (CONFIG_TFM_USE_TRUSTZONE) |
Raef Coles | 25fc175 | 2020-11-24 12:04:42 +0000 | [diff] [blame] | 16 | install(FILES ${CMAKE_BINARY_DIR}/secure_fw/s_veneers.o |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 17 | DESTINATION ${INSTALL_INTERFACE_LIB_DIR}) |
David Hu | b24aead | 2020-10-17 19:46:19 +0800 | [diff] [blame] | 18 | endif() |
| 19 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 20 | ####################### export headers ######################################### |
| 21 | |
| 22 | install(FILES ${INTERFACE_INC_DIR}/psa/client.h |
| 23 | ${INTERFACE_INC_DIR}/psa/error.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 24 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 25 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 26 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa_manifest/sid.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 27 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa_manifest) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 28 | |
Kevin Peng | 27cf4de | 2023-10-26 16:04:46 +0800 | [diff] [blame] | 29 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/config_impl.h |
| 30 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 31 | |
Kevin Peng | 0e340ea | 2023-08-15 17:51:44 +0800 | [diff] [blame] | 32 | install(FILES ${INTERFACE_INC_DIR}/tfm_veneers.h |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 33 | ${INTERFACE_INC_DIR}/tfm_ns_interface.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 34 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 35 | |
Sherry Zhnag | 482b88b | 2021-08-19 17:51:47 +0800 | [diff] [blame] | 36 | install(FILES ${INTERFACE_INC_DIR}/tfm_ns_client_ext.h |
| 37 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 38 | |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 39 | install(FILES ${CMAKE_SOURCE_DIR}/secure_fw/include/config_tfm.h |
| 40 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
David Hu | 6d1a9b6 | 2023-02-22 16:54:04 +0800 | [diff] [blame] | 41 | install(FILES ${CMAKE_SOURCE_DIR}/config/config_base.h |
| 42 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 43 | |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 44 | install(FILES ${INTERFACE_INC_DIR}/tfm_psa_call_pack.h |
| 45 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 46 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa/framework_feature.h |
| 47 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Xinyu Zhang | 93899d0 | 2021-05-11 10:48:52 +0800 | [diff] [blame] | 48 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 49 | if (TFM_PARTITION_NS_AGENT_MAILBOX) |
David Hu | 04969a4 | 2020-06-14 21:25:35 +0800 | [diff] [blame] | 50 | install(FILES ${INTERFACE_INC_DIR}/multi_core/tfm_multi_core_api.h |
| 51 | ${INTERFACE_INC_DIR}/multi_core/tfm_ns_mailbox.h |
| 52 | ${INTERFACE_INC_DIR}/multi_core/tfm_mailbox.h |
David Hu | cb91581 | 2021-12-27 14:22:04 +0800 | [diff] [blame] | 53 | ${INTERFACE_INC_DIR}/multi_core/tfm_ns_mailbox_test.h |
David Hu | 186a129 | 2021-09-13 09:05:52 +0800 | [diff] [blame] | 54 | ${CMAKE_BINARY_DIR}/generated/interface/include/tfm_mailbox_config.h |
David Hu | 71f6dcc | 2023-10-18 11:52:21 +0800 | [diff] [blame] | 55 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/multi_core) |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 56 | endif() |
| 57 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 58 | if (TFM_PARTITION_PROTECTED_STORAGE) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 59 | install(FILES ${INTERFACE_INC_DIR}/psa/protected_storage.h |
Jamie Fox | 133ce09 | 2023-11-01 18:42:42 +0000 | [diff] [blame] | 60 | ${INTERFACE_INC_DIR}/psa/storage_common.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 61 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 62 | install(FILES ${INTERFACE_INC_DIR}/tfm_ps_defs.h |
| 63 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 64 | endif() |
| 65 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 66 | if (TFM_PARTITION_INTERNAL_TRUSTED_STORAGE) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 67 | install(FILES ${INTERFACE_INC_DIR}/psa/internal_trusted_storage.h |
| 68 | ${INTERFACE_INC_DIR}/psa/storage_common.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 69 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 70 | install(FILES ${INTERFACE_INC_DIR}/tfm_its_defs.h |
| 71 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 72 | endif() |
| 73 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 74 | if (TFM_PARTITION_CRYPTO) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 75 | install(FILES ${INTERFACE_INC_DIR}/psa/crypto_extra.h |
| 76 | ${INTERFACE_INC_DIR}/psa/crypto_compat.h |
| 77 | ${INTERFACE_INC_DIR}/psa/crypto.h |
| 78 | ${INTERFACE_INC_DIR}/psa/crypto_client_struct.h |
Xinyu Zhang | fce2037 | 2023-04-10 14:43:47 +0800 | [diff] [blame] | 79 | ${INTERFACE_INC_DIR}/psa/crypto_platform.h |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 80 | ${INTERFACE_INC_DIR}/psa/crypto_sizes.h |
| 81 | ${INTERFACE_INC_DIR}/psa/crypto_struct.h |
| 82 | ${INTERFACE_INC_DIR}/psa/crypto_types.h |
| 83 | ${INTERFACE_INC_DIR}/psa/crypto_values.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 84 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 85 | install(FILES ${INTERFACE_INC_DIR}/tfm_crypto_defs.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 86 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 87 | endif() |
| 88 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 89 | if (TFM_PARTITION_INITIAL_ATTESTATION) |
David Hu | 9191b61 | 2023-06-08 12:02:39 +0800 | [diff] [blame] | 90 | install(FILES ${CMAKE_BINARY_DIR}/generated/interface/include/psa/initial_attestation.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 91 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 92 | install(FILES ${INTERFACE_INC_DIR}/tfm_attest_defs.h |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 93 | ${INTERFACE_INC_DIR}/tfm_attest_iat_defs.h |
David Hu | dc8cb9e | 2021-11-10 12:45:59 +0800 | [diff] [blame] | 94 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 95 | endif() |
| 96 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 97 | if(TFM_PARTITION_PLATFORM) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 98 | install(FILES ${INTERFACE_INC_DIR}/tfm_platform_api.h |
Raef Coles | 4fed463 | 2020-12-08 12:56:47 +0000 | [diff] [blame] | 99 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 100 | endif() |
| 101 | |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 102 | if(TFM_PARTITION_FIRMWARE_UPDATE) |
| 103 | install(FILES ${INTERFACE_INC_DIR}/psa/update.h |
Sherry Zhang | 73126e5 | 2022-02-15 14:27:49 +0800 | [diff] [blame] | 104 | ${CMAKE_BINARY_DIR}/generated/interface/include/psa/fwu_config.h |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 105 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}/psa) |
| 106 | install(FILES ${INTERFACE_INC_DIR}/tfm_fwu_defs.h |
| 107 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 108 | endif() |
| 109 | |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 110 | if(PLATFORM_DEFAULT_CRYPTO_KEYS) |
| 111 | install(DIRECTORY ${INTERFACE_INC_DIR}/crypto_keys |
| 112 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 113 | endif() |
| 114 | |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 115 | ####################### export sources ######################################### |
| 116 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 117 | if (TFM_PARTITION_NS_AGENT_MAILBOX) |
David Hu | 04969a4 | 2020-06-14 21:25:35 +0800 | [diff] [blame] | 118 | install(FILES ${INTERFACE_SRC_DIR}/multi_core/tfm_ns_mailbox.c |
| 119 | ${INTERFACE_SRC_DIR}/multi_core/tfm_multi_core_ns_api.c |
| 120 | ${INTERFACE_SRC_DIR}/multi_core/tfm_multi_core_psa_ns_api.c |
David Hu | d597345 | 2020-11-26 16:47:46 +0800 | [diff] [blame] | 121 | ${INTERFACE_SRC_DIR}/multi_core/tfm_ns_mailbox_thread.c |
David Hu | 32bd615 | 2022-09-27 13:10:36 +0800 | [diff] [blame] | 122 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}/multi_core) |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 123 | endif() |
David Hu | f07f3f1 | 2021-04-06 18:03:33 +0800 | [diff] [blame] | 124 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 125 | if (TFM_PARTITION_NS_AGENT_TZ) |
Xinyu Zhang | 1c12d56 | 2023-10-24 12:02:22 +0800 | [diff] [blame] | 126 | install(FILES ${INTERFACE_SRC_DIR}/tfm_tz_psa_ns_api.c |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 127 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
| 128 | endif() |
| 129 | |
BohdanHunko | f871df0 | 2023-02-03 14:36:41 +0200 | [diff] [blame] | 130 | install(DIRECTORY ${INTERFACE_INC_DIR}/os_wrapper |
| 131 | DESTINATION ${INSTALL_INTERFACE_INC_DIR}) |
| 132 | |
Chris Brand | fbf3f46 | 2022-06-23 15:27:20 -0700 | [diff] [blame] | 133 | if (CONFIG_TFM_USE_TRUSTZONE) |
BohdanHunko | f871df0 | 2023-02-03 14:36:41 +0200 | [diff] [blame] | 134 | install(DIRECTORY ${INTERFACE_SRC_DIR}/os_wrapper |
David Hu | f07f3f1 | 2021-04-06 18:03:33 +0800 | [diff] [blame] | 135 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Raef Coles | 035c83b | 2020-09-29 10:32:52 +0100 | [diff] [blame] | 136 | endif() |
| 137 | |
Mark Horvath | fbc2c50 | 2022-09-09 16:16:07 +0200 | [diff] [blame] | 138 | if (TFM_PARTITION_PROTECTED_STORAGE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 139 | install(FILES ${INTERFACE_SRC_DIR}/tfm_ps_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +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_INTERNAL_TRUSTED_STORAGE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 144 | install(FILES ${INTERFACE_SRC_DIR}/tfm_its_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_CRYPTO) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 149 | install(FILES ${INTERFACE_SRC_DIR}/tfm_crypto_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_INITIAL_ATTESTATION) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 154 | install(FILES ${INTERFACE_SRC_DIR}/tfm_attest_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_PLATFORM) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 159 | install(FILES ${INTERFACE_SRC_DIR}/tfm_platform_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() |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 162 | |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 163 | ##################### Export image signing information ######################### |
| 164 | |
Raef Coles | cdf3931 | 2023-11-03 14:37:18 +0000 | [diff] [blame] | 165 | if(BL2 AND PLATFORM_DEFAULT_IMAGE_SIGNING) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 166 | install(DIRECTORY bl2/ext/mcuboot/scripts |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 167 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR} |
| 168 | PATTERN "scripts/*.py" |
| 169 | PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ |
| 170 | GROUP_EXECUTE GROUP_READ |
| 171 | PATTERN "scripts/wrapper/*.py" |
| 172 | PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ |
| 173 | GROUP_EXECUTE GROUP_READ) |
| 174 | |
| 175 | install(DIRECTORY ${MCUBOOT_PATH}/scripts/imgtool |
| 176 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/scripts) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 177 | |
| 178 | if (MCUBOOT_ENC_IMAGES) |
| 179 | install(FILES ${MCUBOOT_KEY_ENC} |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 180 | RENAME image_enc_key.pem |
Alamy Liu | 2c13c03 | 2021-01-20 09:55:50 -0800 | [diff] [blame] | 181 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 182 | endif() |
| 183 | |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 184 | install(FILES $<TARGET_OBJECTS:signing_layout_s> |
Alamy Liu | 2c13c03 | 2021-01-20 09:55:50 -0800 | [diff] [blame] | 185 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/layout_files) |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 186 | install(FILES ${MCUBOOT_KEY_S} |
| 187 | RENAME image_s_signing_private_key.pem |
Bence Balogh | de3e121 | 2023-07-07 13:07:38 +0200 | [diff] [blame] | 188 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
David Hu | 7673422 | 2023-11-15 12:17:17 +0800 | [diff] [blame^] | 189 | # Specify the MCUBOOT_KEY_S path for NS build |
| 190 | set(MCUBOOT_INSTALL_KEY_S |
| 191 | ${INSTALL_IMAGE_SIGNING_DIR}/keys/image_s_signing_private_key.pem) |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 192 | install(FILES $<TARGET_FILE_DIR:bl2>/image_s_signing_public_key.pem |
Bence Balogh | 11074a2 | 2023-09-29 17:53:06 +0200 | [diff] [blame] | 193 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 194 | |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 195 | if(MCUBOOT_IMAGE_NUMBER GREATER 1) |
| 196 | install(FILES $<TARGET_OBJECTS:signing_layout_ns> |
| 197 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/layout_files) |
| 198 | install(FILES ${MCUBOOT_KEY_NS} |
| 199 | RENAME image_ns_signing_private_key.pem |
David Hu | 7673422 | 2023-11-15 12:17:17 +0800 | [diff] [blame^] | 200 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
| 201 | # Specify the MCUBOOT_KEY_NS path for NS build |
| 202 | set(MCUBOOT_INSTALL_KEY_NS |
| 203 | ${INSTALL_IMAGE_SIGNING_DIR}/keys/image_ns_signing_private_key.pem) |
Raef Coles | 1d68b87 | 2023-11-06 16:33:34 +0000 | [diff] [blame] | 204 | install(FILES $<TARGET_FILE_DIR:bl2>/image_ns_signing_public_key.pem |
| 205 | DESTINATION ${INSTALL_IMAGE_SIGNING_DIR}/keys) |
| 206 | endif() |
Raef Coles | b6814d5 | 2020-12-08 13:15:40 +0000 | [diff] [blame] | 207 | endif() |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 208 | |
| 209 | if(TFM_PARTITION_FIRMWARE_UPDATE) |
Summer Qin | d23bbb3 | 2022-10-18 15:30:06 +0800 | [diff] [blame] | 210 | install(FILES ${INTERFACE_SRC_DIR}/tfm_fwu_api.c |
Summer Qin | 566e03b | 2022-10-08 17:27:42 +0800 | [diff] [blame] | 211 | DESTINATION ${INSTALL_INTERFACE_SRC_DIR}) |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 212 | endif() |
Chris Brand | 9edf081 | 2022-07-05 14:18:42 -0700 | [diff] [blame] | 213 | |
Jianliang Shen | bd624ed | 2023-10-24 15:42:59 +0800 | [diff] [blame] | 214 | ######################### Export common configurations ######################### |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 215 | |
Jianliang Shen | bd624ed | 2023-10-24 15:42:59 +0800 | [diff] [blame] | 216 | install(FILES ${CMAKE_SOURCE_DIR}/config/cp_config_default.cmake |
| 217 | ${CMAKE_SOURCE_DIR}/config/cp_check.cmake |
| 218 | DESTINATION ${INSTALL_CONFIG_DIR}) |
David Hu | 895cdc3 | 2023-01-16 19:19:25 +0800 | [diff] [blame] | 219 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 220 | ###################### Install NS platform sources ############################# |
Chris Brand | 9edf081 | 2022-07-05 14:18:42 -0700 | [diff] [blame] | 221 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 222 | install(CODE "MESSAGE(\"----- Installing platform NS -----\")") |
| 223 | |
David Hu | 66bd9a0 | 2023-10-18 22:34:19 +0800 | [diff] [blame] | 224 | install(DIRECTORY ${PLATFORM_DIR}/ext/cmsis |
| 225 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}/ext) |
| 226 | |
| 227 | if(PLATFORM_DEFAULT_UART_STDOUT) |
| 228 | install(FILES ${PLATFORM_DIR}/ext/common/uart_stdout.c |
| 229 | ${PLATFORM_DIR}/ext/common/uart_stdout.h |
| 230 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}/ext/common) |
| 231 | endif() |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 232 | |
David Hu | 71f6dcc | 2023-10-18 11:52:21 +0800 | [diff] [blame] | 233 | install(DIRECTORY ${PLATFORM_DIR}/include |
| 234 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}) |
| 235 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 236 | install(FILES ${CMAKE_SOURCE_DIR}/cmake/spe-CMakeLists.cmake |
Anton Komlev | 3dd9863 | 2023-09-20 16:26:30 +0100 | [diff] [blame] | 237 | DESTINATION ${CMAKE_INSTALL_PREFIX} |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 238 | RENAME CMakeLists.txt) |
| 239 | |
David Hu | c28b9b2 | 2023-10-14 15:33:16 +0800 | [diff] [blame] | 240 | install(FILES ${PLATFORM_DIR}/ns/toolchain_ns_GNUARM.cmake |
| 241 | ${PLATFORM_DIR}/ns/toolchain_ns_ARMCLANG.cmake |
David Hu | 2bbcb96 | 2023-11-01 14:29:53 +0800 | [diff] [blame] | 242 | ${PLATFORM_DIR}/ns/toolchain_ns_IARARM.cmake |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 243 | DESTINATION ${INSTALL_CMAKE_DIR}) |
| 244 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 245 | install(FILES |
| 246 | ${CMAKE_SOURCE_DIR}/lib/fih/inc/fih.h |
| 247 | ${PLATFORM_DIR}/include/tfm_plat_ns.h |
| 248 | DESTINATION ${INSTALL_PLATFORM_NS_DIR}/include) |
| 249 | |
| 250 | if (TARGET psa_crypto_config) |
| 251 | # FIXIT: This is a temporal patch to reduce the change scope and simplify review. |
| 252 | # In the future we shall decouple this target from tfm_config becuase |
| 253 | # "psa_crypto_config" target exists not in all configurations. |
| 254 | # Functionally "psa_crypto_config" provides only include path for Crypto accelerator. |
| 255 | install(TARGETS tfm_config psa_crypto_config psa_interface |
Anton Komlev | 3dd9863 | 2023-09-20 16:26:30 +0100 | [diff] [blame] | 256 | DESTINATION ${CMAKE_INSTALL_PREFIX} |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 257 | EXPORT tfm-config |
| 258 | ) |
| 259 | else() |
| 260 | install(TARGETS tfm_config psa_interface |
Anton Komlev | 3dd9863 | 2023-09-20 16:26:30 +0100 | [diff] [blame] | 261 | DESTINATION ${CMAKE_INSTALL_PREFIX} |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 262 | EXPORT tfm-config |
| 263 | ) |
| 264 | endif() |
| 265 | |
| 266 | target_include_directories(psa_interface |
| 267 | INTERFACE |
| 268 | $<INSTALL_INTERFACE:interface/include> |
| 269 | ) |
| 270 | |
| 271 | install(EXPORT tfm-config |
| 272 | FILE spe_export.cmake |
| 273 | DESTINATION ${INSTALL_CMAKE_DIR}) |
| 274 | |
| 275 | configure_file(${CMAKE_SOURCE_DIR}/config/spe_config.cmake.in |
| 276 | ${INSTALL_CMAKE_DIR}/spe_config.cmake @ONLY) |
David Hu | 9af4d7d | 2023-11-01 07:52:17 +0800 | [diff] [blame] | 277 | |
| 278 | # Toolchain utils |
| 279 | install(FILES cmake/set_extensions.cmake |
| 280 | DESTINATION ${INSTALL_CMAKE_DIR}) |