aboutsummaryrefslogtreecommitdiff
path: root/bl2/CMakeLists.txt
diff options
context:
space:
mode:
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()