android: boot: support boot image header version 3 and 4
Enable the support for boot image header version 3 and 4
using abootimg command.
In order to use version 3 or 4:
1- Vendor boot image address should be given to abootimg cmd.
abootimg addr $1 $vendor_boot_load_addr
2- "ramdisk_addr_r" env variable (ramdisk address) should be set to host
the ramdisk : generic ramdisk + vendor ramdisk
Replace "struct andr_boot_img_hdr_v0*" by "void *" in
some functions since v3 and v4 are now supported as well.
Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index d639f37..f10200f 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -529,7 +529,7 @@
}
#ifdef CONFIG_ANDROID_BOOT_IMAGE
} else if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) {
- struct andr_boot_img_hdr_v0 *hdr = buf;
+ void *hdr = buf;
ulong fdt_data, fdt_len;
u32 fdt_size, dtb_idx;
/*