app: aboot: For AVB2.0, add salt buffer offset to buffer initialized in fastboot mode
For AVB 2.0, Salt Buffer is required to copy salt at start of verified image.
This fix adds the salt buffer offset at the start of the image.
Change-Id: I99b983898baa4f2cfbea3257181c673536cf8236
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index d252c25..e478e49 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -5144,7 +5144,13 @@
partition_dump();
/* initialize and start fastboot */
+#if !VERIFIED_BOOT_2
fastboot_init(target_get_scratch_address(), target_get_max_flash_size());
+#else
+ /* Add salt buffer offset at start of image address to copy VB salt */
+ fastboot_init(ADD_SALT_BUFF_OFFSET(target_get_scratch_address()),
+ SUB_SALT_BUFF_OFFSET(target_get_max_flash_size()));
+#endif
#if FBCON_DISPLAY_MSG
display_fastboot_menu();
#endif