Build: Support multi params in 'extra_params'
This patch extend 'extra_params' in build helper to support multiple
extra params in one config. Params are seperated by ', '.
For example, for a config with both FPHARD and LZOFF enabled,
extra_params can be set as "FPHARD, LZOFF". Then the build helper
will append the configs in the build command generated automatically.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I645284c4ef37d47feb5e31fe093d67a446778c5a
diff --git a/build_helper/build_helper_config_maps.py b/build_helper/build_helper_config_maps.py
index 1651c0b..009fdd7 100644
--- a/build_helper/build_helper_config_maps.py
+++ b/build_helper/build_helper_config_maps.py
@@ -65,9 +65,7 @@
"FPSOFT" : "-DCONFIG_TFM_FP=soft ",
"FPHARD" : ("-DCONFIG_TFM_FP=hard "
"-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "),
- "FPHARD_LOFF" : ("-DCONFIG_TFM_FP=hard "
- "-DCONFIG_TFM_LAZY_STACKING=OFF "
- "-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "),
+ "LZOFF" : "-DCONFIG_TFM_LAZY_STACKING=OFF ",
# SFN
"SFN" : "-DCONFIG_TFM_SPM_BACKEND=SFN ",
# CC Driver
@@ -80,4 +78,5 @@
# Corstone1000 support
"FVP" : "-DPLATFORM_IS_FVP=True ",
"FPGA" : "-DPLATFORM_IS_FVP=False ",
+ "S_PS_OFF" : "-DTEST_S_PS=OFF ",
}
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index 236a3dc..255894e 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -451,7 +451,7 @@
"with_ns": [True],
"profile": [""],
"partition_ps": ["ON"],
- "extra_params": ["FPSOFT", "FPHARD", "FPHARD_LOFF"]
+ "extra_params": ["FPSOFT", "FPHARD", "FPHARD, LZOFF"]
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + []
@@ -725,7 +725,7 @@
"with_ns": [False],
"profile": [""],
"partition_ps": ["ON"],
- "extra_params": ["FVP", "FPGA"]
+ "extra_params": ["S_PS_OFF, FVP", "FPGA"]
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + []
diff --git a/tfm_ci_pylib/tfm_build_manager.py b/tfm_ci_pylib/tfm_build_manager.py
index f78c9e8..b5d7594 100644
--- a/tfm_ci_pylib/tfm_build_manager.py
+++ b/tfm_ci_pylib/tfm_build_manager.py
@@ -90,6 +90,13 @@
return compiler_name
+ def map_extra_params(self, params):
+ extra_params = ""
+ param_list = params.split(", ")
+ for param in param_list:
+ extra_params += mapExtraParams[param]
+ return extra_params
+
def get_config(self):
return list(self._tbm_build_cfg.keys())
@@ -401,7 +408,7 @@
"with_ns": i.with_ns,
"profile": "" if i.profile=="N.A" else i.profile,
"partition_ps": i.partition_ps,
- "extra_params": mapExtraParams[i.extra_params]}
+ "extra_params": self.map_extra_params(i.extra_params)}
if i.test_psa_api == "IPC":
overwrite_params["test_psa_api"] += " -DINCLUDE_PANIC_TESTS=1"
if i.test_psa_api == "CRYPTO" and "musca" in i.tfm_platform:
@@ -592,7 +599,7 @@
if list(i)[10] == "OFF": #PARTITION_PS
config_param.append("PSOFF")
if list(i)[11]: # EXTRA_PARAMS
- config_param.append(list(i)[11])
+ config_param.append(list(i)[11].replace(", ", "_"))
i_str = "_".join(config_param)
ret_cfg[i_str] = i
return ret_cfg