aboutsummaryrefslogtreecommitdiff
path: root/bl2/CMakeLists.txt
diff options
context:
space:
mode:
authorTamas Ban <tamas.ban@arm.com>2020-10-27 09:03:56 +0000
committerTamas Ban <tamas.ban@arm.com>2020-12-17 13:06:19 +0000
commit4a5cc9776ed3b053bac57326931f936fbbc660e9 (patch)
tree870ca6368563188d4f252c85b0d3e8cf39d3bfd0 /bl2/CMakeLists.txt
parentf8b0b2df5e9b954fd5d59ae95684659e73b38c8c (diff)
downloadtrusted-firmware-m-4a5cc9776ed3b053bac57326931f936fbbc660e9.tar.gz
Build: Add mbedtls patch to help code sharing
Adds a patch file that, when applied to mbedtls, will remove the 'static' keyword from some function pointers related to memory allocation. This allows more functions to be shared between MCUboot and the secure firmware. Signed-off-by: Balint Matyi <Balint.Matyi@arm.com> Change-Id: Ibc6cbb3ab18fccc92a5b8608b9f1ef54c1136d2f
Diffstat (limited to 'bl2/CMakeLists.txt')
-rw-r--r--bl2/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/bl2/CMakeLists.txt b/bl2/CMakeLists.txt
index 42cd65fb6b..b809587e47 100644
--- a/bl2/CMakeLists.txt
+++ b/bl2/CMakeLists.txt
@@ -105,4 +105,11 @@ target_link_libraries(bl2_mbedcrypto
if (TFM_CODE_SHARING)
compiler_create_shared_code(bl2 ${CMAKE_CURRENT_SOURCE_DIR}/src/shared_symbol_template.txt)
+
+ if (NOT EXISTS ${MBEDCRYPTO_PATH}/library/code_share.c)
+ message(FATAL_ERROR "File ${MBEDCRYPTO_PATH}/library/code_share.c does not exist.
+ Have the patch ${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/0005-Enable-crypto-code-sharing-between-independent-binar.patch
+ been applied to the mbedcrypto repo at ${MBEDCRYPTO_PATH}?
+ Hint: The command might be `cd ${MBEDCRYPTO_PATH} && git apply ${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/*.patch`")
+ endif()
endif()