Lines Matching full:write
113 f.write(pack(str(pad) + 'x'))
145 args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
147 args.output.write(pack('I', filesize(args.kernel)))
149 args.output.write(pack('I', filesize(args.ramdisk)))
151 args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
152 args.output.write(pack('I', boot_header_size))
154 args.output.write(pack('4I', 0, 0, 0, 0))
156 args.output.write(pack('I', args.header_version))
157 args.output.write(pack(f'{BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE}s',
164 args.output.write(pack('I', boot_signature_size))
176 args.vendor_boot.write(pack(f'{VENDOR_BOOT_MAGIC_SIZE}s',
179 args.vendor_boot.write(pack('I', args.header_version))
181 args.vendor_boot.write(pack('I', args.pagesize))
183 args.vendor_boot.write(pack('I', args.base + args.kernel_offset))
185 args.vendor_boot.write(pack('I', args.base + args.ramdisk_offset))
187 args.vendor_boot.write(pack('I', vendor_ramdisk_size))
188 args.vendor_boot.write(pack(f'{VENDOR_BOOT_ARGS_SIZE}s',
191 args.vendor_boot.write(pack('I', args.base + args.tags_offset))
193 args.vendor_boot.write(pack(f'{VENDOR_BOOT_NAME_SIZE}s', args.board))
196 args.vendor_boot.write(pack('I', vendor_boot_header_size))
199 args.vendor_boot.write(pack('I', filesize(args.dtb)))
201 args.vendor_boot.write(pack('Q', args.base + args.dtb_offset))
207 args.vendor_boot.write(pack('I', vendor_ramdisk_table_size))
209 args.vendor_boot.write(pack('I', args.vendor_ramdisk_table_entry_num))
211 args.vendor_boot.write(pack('I', VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE))
213 args.vendor_boot.write(pack('I', filesize(args.vendor_bootconfig)))
229 args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
231 args.output.write(pack('I', filesize(args.kernel)))
233 args.output.write(pack('I', args.base + args.kernel_offset))
235 args.output.write(pack('I', filesize(args.ramdisk)))
237 args.output.write(pack('I', ramdisk_load_address))
239 args.output.write(pack('I', filesize(args.second)))
241 args.output.write(pack('I', second_load_address))
243 args.output.write(pack('I', args.base + args.tags_offset))
245 args.output.write(pack('I', args.pagesize))
247 args.output.write(pack('I', args.header_version))
249 args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
251 args.output.write(pack(f'{BOOT_NAME_SIZE}s', args.board))
252 args.output.write(pack(f'{BOOT_ARGS_SIZE}s', args.cmdline))
266 args.output.write(img_id)
267 args.output.write(pack(f'{BOOT_EXTRA_ARGS_SIZE}s', args.extra_cmdline))
272 args.output.write(pack('I', filesize(args.recovery_dtbo)))
274 args.output.write(pack('Q', get_recovery_dtbo_offset(args)))
277 args.output.write(pack('I', 0))
278 args.output.write(pack('Q', 0))
282 args.output.write(pack('I', BOOT_IMAGE_HEADER_V1_SIZE))
284 args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))
291 args.output.write(pack('I', filesize(args.dtb)))
293 args.output.write(pack('Q', args.base + args.dtb_offset))
370 fout.write(f.read())
375 fout.write(pack('I', entry.ramdisk_size))
376 fout.write(pack('I', entry.ramdisk_offset))
377 fout.write(pack('I', entry.ramdisk_type))
378 fout.write(pack(f'{VENDOR_RAMDISK_NAME_SIZE}s',
380 fout.write(entry.board_id)
387 f_out.write(f_in.read())
637 args.output.write(boot_signature_bytes)