aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Peng <kevin.peng@arm.com>2021-07-14 10:28:23 +0800
committerAnton Komlev <Anton.Komlev@arm.com>2021-07-16 11:45:13 +0200
commit3880066b9212edd5b2bac06f73a1ea2585713183 (patch)
treeba5bd195be76d8670779b0fa40454568568515fa
parente316c1f5042d90e724a614d6f1262b1d89eec1c6 (diff)
downloadtrusted-firmware-m-3880066b9212edd5b2bac06f73a1ea2585713183.tar.gz
Build: Allow customized manifest lists
The tfm_manifest_list.yaml is used by default and only extra manifest lists are allowed for customization. This patch makes the default manifest list replacable as well. This can avoid issues that the extra manifest and the default manifest may have conflict Partitions or there could be conflicts within the default manifest list on some specific builds. Note: The Partition configuration switches defined in "conditional" are still required to set to OFF to disable building Partitions even if they are not in manifest lists. This patch also fixes the wrong directory in config/set_config.cmake which happens to be correct when building. Change-Id: Id701e174d511c8fe34d62e8a3ff4813460aab2e9 Signed-off-by: Kevin Peng <kevin.peng@arm.com>
-rw-r--r--config/config_default.cmake2
-rw-r--r--config/set_config.cmake4
-rw-r--r--tools/CMakeLists.txt8
3 files changed, 8 insertions, 6 deletions
diff --git a/config/config_default.cmake b/config/config_default.cmake
index b6f8c15ab4..463c5ca199 100644
--- a/config/config_default.cmake
+++ b/config/config_default.cmake
@@ -24,6 +24,8 @@ set(TFM_FIH_PROFILE OFF CACHE STRING "Fault injec
set(TFM_NS_CLIENT_IDENTIFICATION OFF CACHE BOOL "Enable NS client identification")
set(TFM_EXTRA_CONFIG_PATH "" CACHE PATH "Path to extra cmake config file")
+
+set(TFM_MANIFEST_LIST ${CMAKE_SOURCE_DIR}/tools/tfm_manifest_list.yaml CACHE FILEPATH "TF-M native Secure Partition manifests list file")
set(TFM_EXTRA_MANIFEST_LIST_PATH "" CACHE PATH "Path to extra manifest file, used to declare extra partitions. Appended to standard TFM manifest")
set(TFM_EXTRA_GENERATED_FILE_LIST_PATH "" CACHE PATH "Path to extra generated file list. Appended to stardard TFM generated file list.")
diff --git a/config/set_config.cmake b/config/set_config.cmake
index 86988e07eb..3ceaa03d36 100644
--- a/config/set_config.cmake
+++ b/config/set_config.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -26,7 +26,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/config/build_type/${CMAKE_BUILD_TYPE_LOWERCASE}.c
endif()
# Load platform config, setting options not already set
-if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/config.cmake)
+if (EXISTS ${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/config.cmake)
include(platform/ext/target/${TFM_PLATFORM}/config.cmake)
endif()
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 7accf48e02..6c276800d1 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -10,10 +10,10 @@ find_package(Python3)
############################### Manifest declaration ###########################
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tfm_manifest_list.yaml
- ${CMAKE_CURRENT_BINARY_DIR}/tfm_manifest_list.yaml)
+get_filename_component(list_name ${TFM_MANIFEST_LIST} NAME)
+configure_file(${TFM_MANIFEST_LIST} ${CMAKE_CURRENT_BINARY_DIR}/${list_name})
-set(MANIFEST_LISTS ${CMAKE_CURRENT_BINARY_DIR}/tfm_manifest_list.yaml)
+set(MANIFEST_LISTS ${CMAKE_CURRENT_BINARY_DIR}/${list_name})
set(MANIFEST_LISTS ${MANIFEST_LISTS} ${TFM_EXTRA_MANIFEST_LIST_PATH})
if ("${TEST_PSA_API}" STREQUAL "IPC")