Switch all platforms artifacts to use the new build system
TF-M changed binaries name and location since 1.1 release.
After enabling additional platforms (Musca B1 and MPS2 on QEMU),
the infra health check started to fail. The build configs were broken in
the first place, due to workarounds to support mixing old and new build
system. This patch finished the migration to the TF-M new build system
and get rid of the related workarounds, FIXMEs and TODOs.
It requires a new recovery image with an updated images.txt file to
match the new filenames.
* Adjust get_artifact_url() to return bin/ URL.
* Add comments to lava_helper_configs.py to clarify the binaries to use.
* Update the binaries filenames. mcuboot.* and tfm_sign.bin are gone.
* Fix qemu_mps2: nobl2 -> bl2. Rename accordingly.
* Cleanup run-build.sh as we don't need to remove/rename/reshuffle files
anymore.
* Adjust fastmodel_wrapper to the binaries paths and filenames used by
the new build system.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Change-Id: I8c23cf1d5430b21bb7ee5b232a9125b089792efd
diff --git a/lava_helper/jinja2_templates/qemu_mps2.jinja2 b/lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
similarity index 100%
rename from lava_helper/jinja2_templates/qemu_mps2.jinja2
rename to lava_helper/jinja2_templates/qemu_mps2_bl2.jinja2
diff --git a/lava_helper/lava_create_jobs.py b/lava_helper/lava_create_jobs.py
index 71baa3f..2e803c3 100755
--- a/lava_helper/lava_create_jobs.py
+++ b/lava_helper/lava_create_jobs.py
@@ -53,13 +53,7 @@
if params["device_type"] == "fvp":
platform = "fvp"
- # FIXME: temporary workaround until we switch all platforms artifacts
- # to use the same location (new build system)
- url = "{}/artifact/trusted-firmware-m/build".format(artifact_store_url.rstrip("/"))
- if platform.lower().startswith("musca"):
- url = "{}/bin/{}".format(url, filename)
- else:
- url = "{}/install/outputs/{}/{}".format(url, platform, filename)
+ url = "{}/artifact/trusted-firmware-m/build/bin/{}".format(artifact_store_url.rstrip("/"), filename)
return url
diff --git a/lava_helper/lava_helper.py b/lava_helper/lava_helper.py
index 54c62ae..6e10323 100755
--- a/lava_helper/lava_helper.py
+++ b/lava_helper/lava_helper.py
@@ -76,7 +76,7 @@
def get_artifact_url(artifact_store_url, params, filename):
- return "{}/{}/artifact/build-ci-all/{}_{}_Config{}_{}_{}/install/outputs/{}/{}".format(
+ url = "{}/{}/artifact/build-ci-all/{}_{}_Config{}_{}_{}/bin/{}/{}".format(
artifact_store_url,
params['build_no'],
params['platform'],
@@ -87,6 +87,7 @@
params['platform'],
filename,
)
+ return url
def get_recovery_url(recovery_store_url, build_no, recovery):
return("{}/{}/artifact/{}".format(
diff --git a/lava_helper/lava_helper_configs.py b/lava_helper/lava_helper_configs.py
index 1920458..d66dc01 100644
--- a/lava_helper/lava_helper_configs.py
+++ b/lava_helper/lava_helper_configs.py
@@ -45,6 +45,11 @@
return cfg
+# MPS2 with BL2 bootloader
+# IMAGE0ADDRESS: 0x10000000
+# IMAGE0FILE: \Software\bl2.bin ; BL2 bootloader
+# IMAGE1ADDRESS: 0x10080000
+# IMAGE1FILE: \Software\tfm_s_ns_signed.bin ; TF-M example application binary blob
tfm_mps2_sse_200 = {
"templ": "mps2.jinja2",
"job_name": "mps2_an521_bl2",
@@ -54,15 +59,15 @@
"monitor_timeout": 10,
"poweroff_timeout": 1,
"recovery_store_url": "https://ci.trustedfirmware.org/userContent/",
- "platforms": {"AN521": "mps2_sse200_an512.tar.gz"},
+ "platforms": {"AN521": "mps2_sse200_an512_new.tar.gz"},
"compilers": ["GNUARM", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["BL2"],
"tests": {
'Default': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -79,8 +84,8 @@
}, # Default
'Regression': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -132,8 +137,8 @@
}, # Regression
'RegressionIPC': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -185,8 +190,8 @@
}, # Regression
'RegressionIPCTfmLevel2': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -238,8 +243,8 @@
}, # Regression
'CoreIPC': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -256,8 +261,8 @@
}, # CoreIPC
'CoreIPCTfmLevel2': {
"binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
},
"monitors": [
{
@@ -276,6 +281,9 @@
}
+# FVP with BL2 bootloader
+# firmware <-> ns <-> application: --application cpu0=bl2.axf
+# bootloader <-> s <-> data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
fvp_mps2_an521_bl2 = {
"templ": "fvp_mps2.jinja2",
"job_name": "fvp_mps2_an521_bl2",
@@ -292,7 +300,7 @@
"tests": {
'Default': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -310,7 +318,7 @@
}, # Default
'DefaultProfileS': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -328,7 +336,7 @@
}, # DefaultProfileS
'DefaultProfileM': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -347,7 +355,7 @@
'Regression': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -401,7 +409,7 @@
'RegressionProfileM': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -454,7 +462,7 @@
}, # RegressionProfileM
'RegressionProfileS': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -508,7 +516,7 @@
'RegressionIPC': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -561,7 +569,7 @@
}, # Regression
'RegressionIPCTfmLevel2': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -614,7 +622,7 @@
}, # Regression
'RegressionIPCTfmLevel3': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -667,7 +675,7 @@
}, # Regression
'CoreIPC': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -685,7 +693,7 @@
}, # CoreIPC
'CoreIPCTfmLevel2': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -703,7 +711,7 @@
}, # CoreIPCTfmLevel2
'CoreIPCTfmLevel3': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -723,6 +731,9 @@
}
+# FVP without BL2 bootloader
+# firmware <-> ns <-> application: --application cpu0=tfm_s.axf
+# bootloader <-> s <-> data: --data cpu0=tfm_ns.bin@0x00100000
fvp_mps2_an521_nobl2 = {
"templ": "fvp_mps2.jinja2",
"job_name": "fvp_mps2_an521_nobl2",
@@ -1170,6 +1181,9 @@
}
+# FVP with BL2 bootloader
+# firmware <-> ns <-> application: --application cpu0=bl2.axf
+# bootloader <-> s <-> data: --data cpu0=tfm_s_ns_signed.bin@0x10080000
fvp_mps2_an519_bl2 = {
"templ": "fvp_mps2.jinja2",
"job_name": "fvp_mps2_an519_bl2",
@@ -1187,7 +1201,7 @@
"tests": {
'Default': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1205,7 +1219,7 @@
}, # Default
'DefaultProfileS': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1223,7 +1237,7 @@
}, # DefaultProfileS
'DefaultProfileM': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1242,7 +1256,7 @@
'Regression': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1296,7 +1310,7 @@
'RegressionProfileM': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1349,7 +1363,7 @@
}, # RegressionProfileM
'RegressionProfileS': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1403,7 +1417,7 @@
'RegressionIPC': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1456,7 +1470,7 @@
}, # Regression
'RegressionIPCTfmLevel2': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1509,7 +1523,7 @@
}, # Regression
'CoreIPC': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1527,7 +1541,7 @@
}, # CoreIPC
'CoreIPCTfmLevel2': {
"binaries": {
- "firmware": "mcuboot.axf",
+ "firmware": "bl2.axf",
"bootloader": "tfm_s_ns_signed.bin"
},
"monitors": [
@@ -1547,6 +1561,9 @@
}
+# FVP without BL2 bootloader
+# firmware <-> ns <-> application: --application cpu0=tfm_s.axf
+# bootloader <-> s <-> data: --data cpu0=tfm_ns.bin@0x00100000
fvp_mps2_an519_nobl2 = {
"templ": "fvp_mps2.jinja2",
"job_name": "fvp_mps2_an519_nobl2",
@@ -1923,6 +1940,48 @@
}
+# MPS2 with BL2 bootloader
+# IMAGE0ADDRESS: 0x10000000
+# IMAGE0FILE: \Software\bl2.bin ; BL2 bootloader
+# IMAGE1ADDRESS: 0x10080000
+# IMAGE1FILE: \Software\tfm_s_ns_signed.bin ; TF-M example application binary blob
+qemu_mps2_bl2 = {
+ "templ": "qemu_mps2_bl2.jinja2",
+ "job_name": "qemu_mps2_bl2",
+ "device_type": "qemu",
+ "job_timeout": 300,
+ "action_timeout": 300,
+ "poweroff_timeout": 20,
+ "platforms": {"AN521": ""},
+ "compilers": ["GNUARM", "ARMCLANG"],
+ "build_types": ["Debug", "Release"],
+ "boot_types": ["BL2"],
+ "tests": {
+ 'Default': {
+ "binaries": {
+ "firmware": "tfm_s_ns_signed.bin",
+ "bootloader": "bl2.bin"
+ },
+ "monitors": [
+ {
+ 'name': 'Secure_Test_Suites_Summary',
+ 'start': '[Sec Thread]',
+ 'end': 'system starting',
+ 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
+ r'(?P<test_case_id>Secure image '
+ r'initializing)(?P<result>!)',
+ 'fixup': {"PASSED": "pass", "FAILED": "fail"},
+ 'required': ["secure_image_initializing"]
+ } # Monitors
+ ]
+ }, # Default
+ }
+}
+
+
+# Musca-B1 with BL2 bootloader
+# unified hex file comprising of both bl2.bin and tfm_s_ns_signed.bin
+# srec_cat bin/bl2.bin -Binary -offset 0xA000000 bin/tfm_s_ns_signed.bin -Binary -offset 0xA020000 -o tfm.hex -Intel
musca_b1_bl2 = {
"templ": "musca_b1.jinja2",
"job_name": "musca_b1_bl2",
@@ -1998,39 +2057,6 @@
},
}
-qemu_mps2 = {
- "templ": "qemu_mps2.jinja2",
- "job_name": "qemu_mps2",
- "device_type": "qemu",
- "job_timeout": 300,
- "action_timeout": 300,
- "poweroff_timeout": 20,
- "platforms": {"AN521": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
- "build_types": ["Debug", "Release"],
- "boot_types": ["NOBL2"],
- "tests": {
- 'Default': {
- "binaries": {
- "firmware": "tfm_sign.bin",
- "bootloader": "mcuboot.bin"
- },
- "monitors": [
- {
- 'name': 'Secure_Test_Suites_Summary',
- 'start': '[Sec Thread]',
- 'end': 'system starting',
- 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
- r'(?P<test_case_id>Secure image '
- r'initializing)(?P<result>!)',
- 'fixup': {"PASSED": "pass", "FAILED": "fail"},
- 'required': ["secure_image_initializing"]
- } # Monitors
- ]
- }, # Default
- }
-}
-
# All configurations should be mapped here
lava_gen_config_map = {
"mps2_an521_bl2": tfm_mps2_sse_200,
@@ -2038,8 +2064,8 @@
"fvp_mps2_an521_nobl2": fvp_mps2_an521_nobl2,
"fvp_mps2_an519_bl2": fvp_mps2_an519_bl2,
"fvp_mps2_an519_nobl2": fvp_mps2_an519_nobl2,
+ "qemu_mps2_bl2": qemu_mps2_bl2,
"musca_b1": musca_b1_bl2,
- "qemu_mps2": qemu_mps2,
}
lavagen_config_sort_order = [