feat(gpt): add ci support to test using backup-gpt
Current GPT test uses the primary GPT header, so corrupt primary GPT
header at second LBA after the MBR. This would force it to use the
backup-gpt header at last LBA.
Also additional changes done to handle backup_gpt header to TF-A
causes BL31 to run out of space so add FVP_TRUSTED_SRAM_SIZE=384
to gpt builds.
Change-Id: I6660a5e3c533f58738272302c8008c88dd82b8a6
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
diff --git a/fvp_utils.sh b/fvp_utils.sh
index 03921f5..888d9a2 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -506,4 +506,14 @@
archive_file "fip_gpt.bin"
}
+#corrupt GPT image header and archive it
+corrupt_gpt_bin() {
+ bin="${1:?}"
+
+ # Primary GPT header is present in LBA-1 second block after MBR
+ # empty the primary GPT header forcing to use backup GPT header
+ # and backup GPT entries.
+ dd if=/dev/zero of=$bin bs=512 seek=1 count=1 conv=notrunc
+}
+
set +u