feat(fwu): add a case to corrupt FWU-metadata
Add a case within the 'corrupt_gpt_bin' function specifically
tailored for corrupting FWU metadata. This case should be
adaptable for use in a test configuration aimed at
corrupting FWU metadata.
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I18ff6abd2499bcdb1a32f88bc15f89c1fdd5efa0
diff --git a/fvp_utils.sh b/fvp_utils.sh
index 015a9b9..69bdc0a 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -595,6 +595,12 @@
seek=2
count=32
;;
+ "fwu-metadata")
+ # Get the LBA number for the FWU metadata. Size of which is always
+ # 1 sector (512 bytes).
+ seek=$(gdisk -l $bin | grep " FWU-Metadata$" | awk '{print $2}')
+ count=1
+ ;;
*)
echo "Invalid $corrupt_data. Use 'header', 'partition-entries'"
return 1