Lines Matching refs:boot_hdr
1039 struct boot_img_hdr_v34 *boot_hdr; in extract_boot_image_v34_header() local
1044 boot_hdr = (struct boot_img_hdr_v34 *)malloc(blk_cnt * dev_desc->blksz); in extract_boot_image_v34_header()
1046 if (!blk_cnt || !boot_hdr) in extract_boot_image_v34_header()
1049 blks_read = blk_dread(dev_desc, boot_img->start, blk_cnt, boot_hdr); in extract_boot_image_v34_header()
1056 if (android_image_check_header((void *)boot_hdr)) { in extract_boot_image_v34_header()
1061 if (boot_hdr->header_version < 3) { in extract_boot_image_v34_header()
1063 boot_hdr->header_version); in extract_boot_image_v34_header()
1077 if (boot_hdr->header_version >= 4 && boot_hdr->os_version == 0) { in extract_boot_image_v34_header()
1080 boot_hdr->os_version = 13 << 25; in extract_boot_image_v34_header()
1083 return boot_hdr; in extract_boot_image_v34_header()
1124 int populate_boot_info(const struct boot_img_hdr_v34 *boot_hdr, in populate_boot_info() argument
1130 memcpy(hdr->magic, boot_hdr->magic, ANDR_BOOT_MAGIC_SIZE); in populate_boot_info()
1132 hdr->kernel_size = boot_hdr->kernel_size; in populate_boot_info()
1143 hdr->ramdisk_size = boot_hdr->ramdisk_size; in populate_boot_info()
1156 hdr->header_version = boot_hdr->header_version; in populate_boot_info()
1167 if (boot_hdr->header_version >= 4 && boot_hdr->os_version == 0) { in populate_boot_info()
1174 hdr->os_version = boot_hdr->os_version; in populate_boot_info()
1187 hdr->header_size = boot_hdr->header_size; in populate_boot_info()
1200 strncpy(hdr->total_cmdline, (const char *)boot_hdr->cmdline, in populate_boot_info()
1201 sizeof(boot_hdr->cmdline)); in populate_boot_info()
1262 struct boot_img_hdr_v34 *boot_hdr = NULL; in populate_andr_img_hdr() local
1297 boot_hdr = extract_boot_image_v34_header(dev_desc, part_boot); in populate_andr_img_hdr()
1300 if (!boot_hdr || !vboot_hdr) in populate_andr_img_hdr()
1303 andr_version = (boot_hdr->os_version >> 25) & 0x7f; in populate_andr_img_hdr()
1327 if (populate_boot_info(boot_hdr, vboot_hdr, in populate_andr_img_hdr()
1334 if (boot_hdr) in populate_andr_img_hdr()
1335 free(boot_hdr); in populate_andr_img_hdr()