Lines Matching refs:pack

22 from struct import pack
40 sha.update(pack('I', filesize(f)))
42 sha.update(pack('I', 0))
47 f.write(pack(str(pad) + 'x'))
70 args.output.write(pack('8s', BOOT_MAGIC))
71 args.output.write(pack(
78 args.output.write(pack('4I', 0, 0, 0, 0)) # reserved
80 args.output.write(pack('I', args.header_version)) # version of bootimage header
81 args.output.write(pack('1536s', args.cmdline.encode()))
88 args.vendor_boot.write(pack('8s', BOOT_MAGIC))
89 args.vendor_boot.write(pack(
96 args.vendor_boot.write(pack('2048s', args.vendor_cmdline.encode()))
97 args.vendor_boot.write(pack('I', args.base + args.tags_offset)) # physical addr for kernel tags
98 args.vendor_boot.write(pack('16s', args.board.encode())) # asciiz product name
99 args.vendor_boot.write(pack('I', VENDOR_BOOT_IMAGE_HEADER_V3_SIZE)) # header size in bytes
102 args.vendor_boot.write(pack('I', filesize(args.dtb))) # size in bytes
103 args.vendor_boot.write(pack('Q', args.base + args.dtb_offset)) # dtb physical load address
116 args.output.write(pack('8s', BOOT_MAGIC))
119 args.output.write(pack(
131 args.output.write(pack('16s', args.board.encode())) # asciiz product name
132 args.output.write(pack('512s', args.cmdline[:512].encode()))
144 img_id = pack('32s', sha.digest())
147 args.output.write(pack('1024s', args.cmdline[512:].encode()))
150 args.output.write(pack('I', filesize(args.recovery_dtbo))) # size in bytes
152 args.output.write(pack('Q', get_recovery_dtbo_offset(args))) # recovery dtbo offset
154 args.output.write(pack('Q', 0)) # Will be set to 0 for devices without a recovery dtbo
158 args.output.write(pack('I', BOOT_IMAGE_HEADER_V1_SIZE))
160 args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))
167 args.output.write(pack('I', filesize(args.dtb))) # size in bytes
168 args.output.write(pack('Q', args.base + args.dtb_offset)) # dtb physical load address