Build: Introduce CONFIG_TFM_BOOT_STORE_MEASUREMENTS

Use the CONFIG_TFM_BOOT_STORE_MEASUREMENTS CMake variable instead of
MCUBOOT_MEASURED_BOOT to control measured boot mechanisms in
each boot stages.
The form (encoding) and amount of the saved measured boot data
can vary depending on the number of boot stages. This variable
can be used the serve the different cases.

Change-Id: I1cdb7372d753228f4b422e12c3f0f90594a2739e
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/config/check_config.cmake b/config/check_config.cmake
index 7438aa9..dccde53 100644
--- a/config/check_config.cmake
+++ b/config/check_config.cmake
@@ -94,7 +94,7 @@
 
 tfm_invalid_config(TFM_PARTITION_PROTECTED_STORAGE AND NOT TFM_PARTITION_INTERNAL_TRUSTED_STORAGE)
 # PS only uses the platform partition when PS_ROLLBACK_PROTECTION is ON, but
-# the dependency in the manifest file means the dependency is unconditional 
+# the dependency in the manifest file means the dependency is unconditional
 tfm_invalid_config(TFM_PARTITION_PROTECTED_STORAGE AND NOT TFM_PARTITION_PLATFORM)
 tfm_invalid_config(PS_ROLLBACK_PROTECTION AND NOT PS_ENCRYPTION)
 
diff --git a/config/config_default.cmake b/config/config_default.cmake
index e12d43f..5e4ffe0 100755
--- a/config/config_default.cmake
+++ b/config/config_default.cmake
@@ -46,6 +46,7 @@
 set(TFM_PARTITION_LOG_LEVEL             TFM_PARTITION_LOG_LEVEL_INFO    CACHE STRING    "Set default Secure Partition log level as INFO level")
 
 set(TFM_CODE_SHARING                    OFF         CACHE PATH      "Enable code sharing between MCUboot and secure firmware")
+set(CONFIG_TFM_BOOT_STORE_MEASUREMENTS  ON          CACHE BOOL      "Store measurement values from all the boot stages. Used for initial attestation token.")
 
 set(TFM_INSTALL_PATH                    ${CMAKE_BINARY_DIR}/install CACHE PATH "Path to which to install TF-M files")