common: android: update image end get for android v2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I4b2cddec072657d69b294dbddf300cf4d0471695
This commit is contained in:
parent
2fe84ae1c5
commit
01918c3fa9
|
|
@ -198,8 +198,12 @@ ulong android_image_get_end(const struct andr_img_hdr *hdr)
|
|||
end += ALIGN(hdr->ramdisk_size, hdr->page_size);
|
||||
end += ALIGN(hdr->second_size, hdr->page_size);
|
||||
|
||||
if (hdr->header_version >= 1)
|
||||
if (hdr->header_version >= 2) {
|
||||
end += ALIGN(hdr->recovery_dtbo_size, hdr->page_size);
|
||||
end += ALIGN(hdr->dtb_size, hdr->page_size);
|
||||
} else if (hdr->header_version >= 1) {
|
||||
end += ALIGN(hdr->recovery_dtbo_size, hdr->page_size);
|
||||
}
|
||||
|
||||
return end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue