group/tf-l3-boot-tests-n1sdp: Add new group and boot test config for N1SDP

Add new group tf-l3-boot-tests-n1sdp.

Add support to fetch the SCP and MCP binaries from the prebuilts
and add boot test config for N1SDP platform in
group/tf-l3-boot-tests-n1sdp.

Also, add this boot test in tf-nomination. This will run the
N1SDP boot test for any change in the n1sdp platform.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I99f1d1eed5adb1e79fdc6f3b8a04bbe3c0b948ed
diff --git a/group/tf-l3-boot-tests-n1sdp/n1sdp-default:n1sdp-linux-fip-firmware-debug b/group/tf-l3-boot-tests-n1sdp/n1sdp-default:n1sdp-linux-fip-firmware-debug
new file mode 100644
index 0000000..1bbc737
--- /dev/null
+++ b/group/tf-l3-boot-tests-n1sdp/n1sdp-default:n1sdp-linux-fip-firmware-debug
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/run_config/n1sdp-fip b/run_config/n1sdp-fip
index a609547..4f031a6 100644
--- a/run_config/n1sdp-fip
+++ b/run_config/n1sdp-fip
@@ -6,11 +6,29 @@
 #
 
 post_tf_build() {
+        #Fetch pre-built SCP/MCP binaries if they haven't been built
+        if [ ! -f "$archive/mcp_rom.bin" ]; then
+                url="$n1sdp_prebuilts/mcp_romfw.bin" saveas="mcp_rom.bin" fetch_file
+                archive_file "mcp_rom.bin"
+        fi
+        if [ ! -f "$archive/scp_rom.bin" ]; then
+                url="$n1sdp_prebuilts/scp_romfw.bin" saveas="scp_rom.bin" fetch_file
+                archive_file "scp_rom.bin"
+        fi
+        if [ ! -f "$archive/scp_ram.bin" ]; then
+                url="$n1sdp_prebuilts/scp_ramfw.bin" saveas="scp_ram.bin" fetch_file
+                archive_file "scp_ram.bin"
+        fi
+        if [ ! -f "$archive/mcp_ram.bin" ]; then
+                url="$n1sdp_prebuilts/mcp_ramfw.bin" saveas="mcp_ram.bin" fetch_file
+                archive_file "mcp_ram.bin"
+        fi
+
         # Create FIP for SCP
-        "$fiptool" create --soc-fw "$tf_root/build/n1sdp/$bin_mode/bl31.bin" --scp-fw "$scp_root/build/product/n1sdp/scp_ramfw/$mode/bin/scp_ramfw.bin" "scp_fw.bin"
+        "$fiptool" create --soc-fw "$tf_root/build/n1sdp/$bin_mode/bl31.bin" --scp-fw "$archive/scp_ram.bin" "scp_fw.bin"
         archive_file "scp_fw.bin"
 
         # Create FIP for MCP, this needs fixed uuid for now
-        "$fiptool" create --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="$scp_root/build/product/n1sdp/mcp_ramfw/$mode/bin/mcp_ramfw.bin" "mcp_fw.bin"
+        "$fiptool" create --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="$archive/mcp_ram.bin" "mcp_fw.bin"
         archive_file "mcp_fw.bin"
 }
diff --git a/script/trusted-firmware.nomination.py b/script/trusted-firmware.nomination.py
index afc4946..216ea8a 100644
--- a/script/trusted-firmware.nomination.py
+++ b/script/trusted-firmware.nomination.py
@@ -32,9 +32,10 @@
         "path:plat/arm/board/tc":
             ["tf-l2-coverity-misra-nominated/fvp-tc-tbb:coverity-tf-misra.diff"],
 
-         # Run Coverity MISRA checks for n1sdp platform changes
+         # Run Coverity MISRA checks and boot test for n1sdp platform changes
         "path:plat/arm/board/n1sdp":
-            ["tf-l2-coverity-misra-nominated/n1sdp-default:coverity-tf-misra.diff"],
+            ["tf-l2-coverity-misra-nominated/n1sdp-default:coverity-tf-misra.diff",
+             "tf-l3-boot-tests-n1sdp/n1sdp-default:n1sdp-linux-fip-firmware-debug"],
 
         # Run Coverity MISRA checks for arm_fpga platform changes
         "path:plat/arm/board/arm_fpga":