Lines Matching refs:boot_hdr
1065 struct boot_img_hdr_v34 *boot_hdr; in extract_boot_image_v34_header() local
1070 boot_hdr = (struct boot_img_hdr_v34 *)malloc(blk_cnt * dev_desc->blksz); in extract_boot_image_v34_header()
1072 if (!blk_cnt || !boot_hdr) in extract_boot_image_v34_header()
1075 blks_read = blk_dread(dev_desc, boot_img->start, blk_cnt, boot_hdr); in extract_boot_image_v34_header()
1082 if (android_image_check_header((void *)boot_hdr)) { in extract_boot_image_v34_header()
1087 if (boot_hdr->header_version < 3) { in extract_boot_image_v34_header()
1089 boot_hdr->header_version); in extract_boot_image_v34_header()
1094 if (boot_hdr->header_version >= 4 && boot_hdr->os_version == 0) { in extract_boot_image_v34_header()
1097 boot_hdr->os_version = 13 << 25; in extract_boot_image_v34_header()
1100 return boot_hdr; in extract_boot_image_v34_header()
1141 int populate_boot_info(const struct boot_img_hdr_v34 *boot_hdr, in populate_boot_info() argument
1147 memcpy(hdr->magic, boot_hdr->magic, ANDR_BOOT_MAGIC_SIZE); in populate_boot_info()
1149 hdr->kernel_size = boot_hdr->kernel_size; in populate_boot_info()
1160 hdr->ramdisk_size = boot_hdr->ramdisk_size; in populate_boot_info()
1173 hdr->header_version = boot_hdr->header_version; in populate_boot_info()
1174 hdr->os_version = boot_hdr->os_version; in populate_boot_info()
1186 hdr->header_size = boot_hdr->header_size; in populate_boot_info()
1199 strncpy(hdr->total_cmdline, (const char *)boot_hdr->cmdline, in populate_boot_info()
1200 sizeof(boot_hdr->cmdline)); in populate_boot_info()
1261 struct boot_img_hdr_v34 *boot_hdr = NULL; in populate_andr_img_hdr() local
1296 boot_hdr = extract_boot_image_v34_header(dev_desc, part_boot); in populate_andr_img_hdr()
1299 if (!boot_hdr || !vboot_hdr) in populate_andr_img_hdr()
1302 andr_version = (boot_hdr->os_version >> 25) & 0x7f; in populate_andr_img_hdr()
1326 if (populate_boot_info(boot_hdr, vboot_hdr, in populate_andr_img_hdr()
1333 if (boot_hdr) in populate_andr_img_hdr()
1334 free(boot_hdr); in populate_andr_img_hdr()