Content print is not supported for version 3 and 4 of boot image header.
Thus, only print that content when v2 is used.
Update android_print_contents() to print an error message
when trying to print boot image header version 3 or 4 content.
Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
*/
void android_print_contents(const struct andr_boot_img_hdr_v0 *hdr)
{
+ if (hdr->header_version >= 3) {
+ printf("Content print is not supported for boot image header version > 2");
+ return;
+ }
const char * const p = IMAGE_INDENT_STRING;
/* os_version = ver << 11 | lvl */
u32 os_ver = hdr->os_version >> 11;
hdr->header_size);
}
- if (hdr->header_version >= 2) {
+ if (hdr->header_version == 2) {
printf("%sdtb size: %x\n", p, hdr->dtb_size);
printf("%sdtb addr: %llx\n", p, hdr->dtb_addr);
}