• Home
  • Raw
  • Download

Lines Matching refs:info

180     info = BootImageInfoFormatter()
181 info.boot_magic = unpack('8s', args.boot_img.read(8))[0].decode()
185 info.header_version = kernel_ramdisk_second_info[8]
187 if info.header_version < 3:
188 info.kernel_size = kernel_ramdisk_second_info[0]
189 info.kernel_load_address = kernel_ramdisk_second_info[1]
190 info.ramdisk_size = kernel_ramdisk_second_info[2]
191 info.ramdisk_load_address = kernel_ramdisk_second_info[3]
192 info.second_size = kernel_ramdisk_second_info[4]
193 info.second_load_address = kernel_ramdisk_second_info[5]
194 info.tags_load_address = kernel_ramdisk_second_info[6]
195 info.page_size = kernel_ramdisk_second_info[7]
198 info.kernel_size = kernel_ramdisk_second_info[0]
199 info.ramdisk_size = kernel_ramdisk_second_info[1]
201 info.second_size = 0
202 info.page_size = BOOT_IMAGE_HEADER_V3_PAGESIZE
204 info.os_version, info.os_patch_level = decode_os_version_patch_level(
207 if info.header_version < 3:
208 info.product_name = cstr(unpack('16s',
210 info.cmdline = cstr(unpack('512s', args.boot_img.read(512))[0].decode())
212 info.extra_cmdline = cstr(unpack('1024s',
215 info.cmdline = cstr(unpack('1536s',
218 if info.header_version in {1, 2}:
219 info.recovery_dtbo_size = unpack('I', args.boot_img.read(1 * 4))[0]
220 info.recovery_dtbo_offset = unpack('Q', args.boot_img.read(8))[0]
221 info.boot_header_size = unpack('I', args.boot_img.read(4))[0]
223 info.recovery_dtbo_size = 0
225 if info.header_version == 2:
226 info.dtb_size = unpack('I', args.boot_img.read(4))[0]
227 info.dtb_load_address = unpack('Q', args.boot_img.read(8))[0]
229 info.dtb_size = 0
230 info.dtb_load_address = 0
232 if info.header_version >= 4:
233 info.boot_signature_size = unpack('I', args.boot_img.read(4))[0]
235 info.boot_signature_size = 0
241 page_size = info.page_size
243 num_kernel_pages = get_number_of_pages(info.kernel_size, page_size)
245 image_info_list = [(kernel_offset, info.kernel_size, 'kernel')]
247 num_ramdisk_pages = get_number_of_pages(info.ramdisk_size, page_size)
250 image_info_list.append((ramdisk_offset, info.ramdisk_size, 'ramdisk'))
252 if info.second_size > 0:
256 image_info_list.append((second_offset, info.second_size, 'second'))
258 if info.recovery_dtbo_size > 0:
259 image_info_list.append((info.recovery_dtbo_offset,
260 info.recovery_dtbo_size,
262 if info.dtb_size > 0:
263 num_second_pages = get_number_of_pages(info.second_size, page_size)
265 info.recovery_dtbo_size, page_size)
270 image_info_list.append((dtb_offset, info.dtb_size, 'dtb'))
272 if info.boot_signature_size > 0:
278 image_info_list.append((boot_signature_offset, info.boot_signature_size,
284 info.image_dir = args.out
286 return info
375 info = VendorBootImageInfoFormatter()
376 info.boot_magic = unpack('8s', args.boot_img.read(8))[0].decode()
377 info.header_version = unpack('I', args.boot_img.read(4))[0]
378 info.page_size = unpack('I', args.boot_img.read(4))[0]
379 info.kernel_load_address = unpack('I', args.boot_img.read(4))[0]
380 info.ramdisk_load_address = unpack('I', args.boot_img.read(4))[0]
381 info.vendor_ramdisk_size = unpack('I', args.boot_img.read(4))[0]
382 info.cmdline = cstr(unpack('2048s', args.boot_img.read(2048))[0].decode())
383 info.tags_load_address = unpack('I', args.boot_img.read(4))[0]
384 info.product_name = cstr(unpack('16s', args.boot_img.read(16))[0].decode())
385 info.header_size = unpack('I', args.boot_img.read(4))[0]
386 info.dtb_size = unpack('I', args.boot_img.read(4))[0]
387 info.dtb_load_address = unpack('Q', args.boot_img.read(8))[0]
390 page_size = info.page_size
392 num_boot_header_pages = get_number_of_pages(info.header_size, page_size)
394 info.vendor_ramdisk_size, page_size)
395 num_boot_dtb_pages = get_number_of_pages(info.dtb_size, page_size)
400 if info.header_version > 3:
401 info.vendor_ramdisk_table_size = unpack('I', args.boot_img.read(4))[0]
404 info.vendor_bootconfig_size = unpack('I', args.boot_img.read(4))[0]
406 info.vendor_ramdisk_table_size, page_size)
435 info.vendor_ramdisk_table = vendor_ramdisk_table
440 image_info_list.append((bootconfig_offset, info.vendor_bootconfig_size,
444 (ramdisk_offset_base, info.vendor_ramdisk_size, 'vendor_ramdisk'))
448 image_info_list.append((dtb_offset, info.dtb_size, 'dtb'))
453 info.image_dir = args.out
455 if info.header_version > 3:
467 return info
474 info = unpack_boot_image(args)
476 info = unpack_vendor_boot_image(args)
481 mkbootimg_args = info.format_mkbootimg_argument()
487 print(info.format_pretty_text())