Attest: Handle discrepancy in tlv_len definitions
The definition of the 'tlv_len' field in the shared boot data entry
header differs in upstream MCUboot repo and in its TF-M fork.
In the upstream repo the 'tlv_len' only covers the length of the payload
but not the size of the entry header. But in the TF-M fork the 'tlv_len'
covers the size of entry header and payload together. This discrepancy
is distinguished during the shared boot data processing based on which
MCUboot version is used along with TF-M runtime.
Change-Id: I0cc4b2a2e6c53d125514b1da7e44be474abdd9e4
Signed-off-by: David Vincze <david.vincze@linaro.org>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 01cc8e4..499cdb6 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -426,6 +426,11 @@
if (${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "NO_SWAP")
set(LINK_TO_BOTH_MEMORY_REGION ON)
endif()
+
+ if (MCUBOOT_REPO STREQUAL "TF-M")
+ # FixMe: LEGACY_TFM_TLV_HEADER could be removed when MCUBoot fork is deleted.
+ set(LEGACY_TFM_TLV_HEADER ON)
+ endif()
endif()
##Set Mbed Crypto compiler flags and variables for crypto service