1From 8d6ed0ac3b1eee4b1e279993ec351e9bd80b68dc Mon Sep 17 00:00:00 2001
2From: Bence Balogh <bence.balogh@arm.com>
3Date: Wed, 31 Jul 2024 13:38:27 +0200
4Subject: [PATCH] Platform: CS1000: Add crypto configs for ADAC
5
6The psa_adac_psa_crypto target needs the MBEDTLS_CONFIG_FILE and
7MBEDTLS_PSA_CRYPTO_CONFIG_FILE defines in order to build correctly.
8The default crypto config files are used here.
9
10Signed-off-by: Bence Balogh <bence.balogh@arm.com>
11Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/31132]
12---
13 platform/ext/target/arm/corstone1000/CMakeLists.txt | 12 ++++++++++++
14 1 file changed, 12 insertions(+)
15
16diff --git a/platform/ext/target/arm/corstone1000/CMakeLists.txt b/platform/ext/target/arm/corstone1000/CMakeLists.txt
17index 530c4059d..3709bf3ec 100644
18--- a/platform/ext/target/arm/corstone1000/CMakeLists.txt
19+++ b/platform/ext/target/arm/corstone1000/CMakeLists.txt
20@@ -412,6 +412,18 @@ if (${PLATFORM_PSA_ADAC_SECURE_DEBUG})
21         PRIVATE
22             platform_bl2
23     )
24+
25+    target_compile_definitions(psa_adac_psa_crypto
26+        PRIVATE
27+            MBEDTLS_CONFIG_FILE="${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/tfm_mbedcrypto_config_default.h"
28+            MBEDTLS_PSA_CRYPTO_CONFIG_FILE="${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/crypto_config_default.h"
29+    )
30+
31+    target_link_libraries(psa_adac_psa_crypto
32+        PRIVATE
33+            psa_crypto_library_config
34+    )
35+
36 endif()
37
38 find_package(Python3)
39--
402.25.1
41
42