Platform, BL2: Add AP, SCP BL1 images to RSS flash map

Changes are:
* Flash map changes to accommodate new images
* NV counter additions to support new images
* Added AP, SCP signed key to BL2. This assumes
  bl2/ext/mcuboot/root-RSA-3072.pem is used to sign AP and SCP BL1
  images

Change-Id: I666230c15b1c28c0d77ef997b13fb350716dc11b
Signed-off-by: Tintu Thomas <tintu.thomas@arm.com>
diff --git a/bl2/ext/mcuboot/keys.c b/bl2/ext/mcuboot/keys.c
index 53be70a..46e73f3 100644
--- a/bl2/ext/mcuboot/keys.c
+++ b/bl2/ext/mcuboot/keys.c
@@ -21,7 +21,7 @@
  * Original code taken from mcuboot project at:
  * https://github.com/mcu-tools/mcuboot
  * Git SHA of the original version: ac55554059147fff718015be9f4bd3108123f50a
- * Modifications are Copyright (c) 2019-2020 Arm Limited.
+ * Modifications are Copyright (c) 2019-2022 Arm Limited.
  */
 
 #include <stddef.h>
@@ -181,7 +181,7 @@
     0xc9, 0x02, 0x03, 0x01, 0x00, 0x01,
 };
 const unsigned int rsa_pub_key_len = 270;
-#if (MCUBOOT_IMAGE_NUMBER ==2)
+#if (MCUBOOT_IMAGE_NUMBER > 1)
 const unsigned char rsa_pub_key_1[] = {
     0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01,
     0x00, 0xac, 0xd2, 0x74, 0x93, 0x3e, 0x5f, 0xe7,
@@ -275,7 +275,7 @@
     0x4b, 0x02, 0x03, 0x01, 0x00, 0x01,
 };
 const unsigned int rsa_pub_key_len = 398;
-#if (MCUBOOT_IMAGE_NUMBER == 2)
+#if (MCUBOOT_IMAGE_NUMBER > 1)
 const unsigned char rsa_pub_key_1[] = {
     0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81,
     0x00, 0xbf, 0xb7, 0xb0, 0x9f, 0xe8, 0xc8, 0xd1,
@@ -341,12 +341,26 @@
         .key = rsa_pub_key,
         .len = &rsa_pub_key_len,
     },
-#if (MCUBOOT_IMAGE_NUMBER == 2)
+#if (MCUBOOT_IMAGE_NUMBER > 1)
     {
         .key = rsa_pub_key_1,
         .len = &rsa_pub_key_len_1,
     },
-#endif
+#endif /* MCUBOOT_IMAGE_NUMBER > 1 */
+#if (MCUBOOT_IMAGE_NUMBER > 2)
+    {
+        /* FIXME assuming the image 0 key is reused here */
+        .key = rsa_pub_key,
+        .len = &rsa_pub_key_len,
+    },
+#endif /* MCUBOOT_IMAGE_NUMBER > 2 */
+#if (MCUBOOT_IMAGE_NUMBER > 3)
+    {
+        /* FIXME assuming the image 0 key is reused here */
+        .key = rsa_pub_key,
+        .len = &rsa_pub_key_len,
+    },
+#endif /* MCUBOOT_IMAGE_NUMBER > 3 */
 };
 const int bootutil_key_cnt = MCUBOOT_IMAGE_NUMBER;
 #endif /* HAVE_KEYS */