common: android: show ramdisk size of boot and vendor-boot
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ia8eca7010989e64d10b09628a12bcfc5aaeb988c
This commit is contained in:
parent
9f568152b6
commit
e7498cb05b
|
|
@ -251,9 +251,14 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
|
|||
*rd_data = ramdisk_addr_r;
|
||||
*rd_len = hdr->ramdisk_size;
|
||||
|
||||
printf("RAM disk load addr 0x%08lx size %u KiB\n",
|
||||
*rd_data, DIV_ROUND_UP(hdr->ramdisk_size, 1024));
|
||||
printf("RAM disk load addr 0x%08lx ", *rd_data);
|
||||
|
||||
if (hdr->header_version < 3)
|
||||
printf("size %u KiB\n", DIV_ROUND_UP(hdr->ramdisk_size, 1024));
|
||||
else
|
||||
printf("size: boot %u KiB, vendor-boot %u KiB\n",
|
||||
DIV_ROUND_UP(hdr->boot_ramdisk_size, 1024),
|
||||
DIV_ROUND_UP(hdr->vendor_ramdisk_size, 1024));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -920,6 +925,7 @@ static int populate_boot_info(const struct boot_img_hdr_v3 *boot_hdr,
|
|||
/* don't use vendor_hdr->kernel_addr, we prefer "hdr + hdr->page_size" */
|
||||
hdr->kernel_addr = ANDROID_IMAGE_DEFAULT_KERNEL_ADDR;
|
||||
/* generic ramdisk: immediately following the vendor ramdisk */
|
||||
hdr->boot_ramdisk_size = boot_hdr->ramdisk_size;
|
||||
hdr->ramdisk_size = boot_hdr->ramdisk_size +
|
||||
vendor_hdr->vendor_ramdisk_size;
|
||||
/* actually, useless */
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ struct andr_img_hdr {
|
|||
* we have to partly merge fields from boot_img_hdr_v3 and vendor_boot_img_hdr_v3
|
||||
* into this structure to compatible with boot_img_hdr_v012.
|
||||
*/
|
||||
u32 boot_ramdisk_size; /* size in bytes */
|
||||
u32 vendor_ramdisk_size; /* size in bytes */
|
||||
u32 vendor_page_size;
|
||||
u32 vendor_header_version;
|
||||
|
|
|
|||
Loading…
Reference in New Issue