Build: Fixes NSOFF build for Musca platforms
Fixes the post_build script for Musca B1 and Musca S1 platforms, as previously
NS artifacts were being looked for in all cases, this introduces conditional
post build scripts.
Change-Id: Ifed93e0e86f6792aa5076488a6ef9224606ef9aa
Signed-off-by: Matthew Dalzell <matthew.dalzell@arm.com>
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index bd124e0..1d2f576 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -89,7 +89,8 @@
"post_build": {"arm/corstone1000": ("dd conv=notrunc bs=1 if=%(ci_build_root_dir)s/spe/bin/bl1_1.bin of=%(ci_build_root_dir)s/spe/bin/bl1.bin seek=0;"
"dd conv=notrunc bs=1 if=%(ci_build_root_dir)s/spe/bin/bl1_provisioning_bundle.bin of=%(ci_build_root_dir)s/spe/bin/bl1.bin seek=40960;"
"%(codebase_root_dir)s/platform/ext/target/arm/corstone1000/create-flash-image.sh %(ci_build_root_dir)s/spe/bin/ cs1000.bin;"),
- "arm/musca_b1": ("srec_cat "
+ "arm/musca_b1": ("if [ -f \"%(ci_build_root_dir)s/nspe\" ]; then "
+ "srec_cat "
"%(ci_build_root_dir)s/spe/bin/"
"bl2.bin "
"-Binary -offset 0xA000000 "
@@ -99,8 +100,22 @@
"-Binary -offset 0xA020000 "
"-fill 0xFF 0xA020000 0xA200000 "
"-o %(ci_build_root_dir)s/"
- "spe/bin/tfm.hex -Intel"),
- "arm/musca_s1": ("srec_cat "
+ "spe/bin/tfm.hex -Intel;"
+ "else "
+ "srec_cat "
+ "%(ci_build_root_dir)s/spe/bin/"
+ "bl2.bin "
+ "-Binary -offset 0xA000000 "
+ "-fill 0xFF 0xA000000 0xA020000 "
+ "%(ci_build_root_dir)s/spe/bin/"
+ "tfm_s_signed.bin "
+ "-Binary -offset 0xA020000 "
+ "-fill 0xFF 0xA020000 0xA200000 "
+ "-o %(ci_build_root_dir)s/"
+ "spe/bin/tfm.hex -Intel;"
+ "fi;"),
+ "arm/musca_s1": ("if [ -f \"%(ci_build_root_dir)s/nspe\" ]; then "
+ "srec_cat "
"%(ci_build_root_dir)s/spe/bin/"
"bl2.bin "
"-Binary -offset 0xA000000 "
@@ -110,7 +125,20 @@
"-Binary -offset 0xA020000 "
"-fill 0xFF 0xA020000 0xA200000 "
"-o %(ci_build_root_dir)s/"
- "spe/bin/tfm.hex -Intel"),
+ "spe/bin/tfm.hex -Intel; "
+ "else "
+ "srec_cat "
+ "%(ci_build_root_dir)s/spe/bin/"
+ "bl2.bin "
+ "-Binary -offset 0xA000000 "
+ "-fill 0xFF 0xA000000 0xA020000 "
+ "%(ci_build_root_dir)s/spe/bin/"
+ "tfm_s_signed.bin "
+ "-Binary -offset 0xA020000 "
+ "-fill 0xFF 0xA020000 0xA200000 "
+ "-o %(ci_build_root_dir)s/"
+ "spe/bin/tfm.hex -Intel;"
+ "fi;"),
"stm/stm32l562e_dk": ("echo 'STM32L562E-DK board post process';"
"%(ci_build_root_dir)s/spe/api_ns/postbuild.sh;"
"pushd %(ci_build_root_dir)s/spe/api_ns;"