Lines Matching +full:read +full:- +full:command

5 # SPDX-License-Identifier: Apache-2.0
10 # -i in_file.bin -o out_file.bin
11 # [-chip <name>] [-v]
61 INVALID_INPUT = -1
75 :param esiost_args: the object representing the command line arguments.
101 :param esiost_args: the object representing the command line arguments.
103 :returns: output file path object, or -1 if fails
110 exit_with_failure("Define input file, using -i flag")
148 :param esiost_args: the object representing the command line arguments.
160 :param esiost_args: the object representing the command line arguments.
172 print(f'- HDR - FW Header ANCHOR - Offset '
173 f'{HDR_ANCHOR_OFFSET} - %s' % FW_HDR_ANCHOR)
181 :param esiost_args: the object representing the command line arguments.
199 message = f'Cannot read firmware length'
203 message = f'Cannot read FW Load start address'
221 fw_arm_entry_byte = input_file.read(4)
226 fw_arm_entry_byte = input_file.read(4)
254 print(f'- HDR - FW load start address - Offset '
255 f'{HDR_FW_LOAD_START_ADDR_OFFSET} - '
257 print(f'- HDR - flash load start address - Offset '
258 f'{HDR_FW_FLASH_ADDR_START_LOAD_OFFSET} - '
260 print(f'- HDR - flash load end address - Offset '
261 f'{HDR_FW_FLASH_ADDR_END_LOAD_OFFSET} - '
271 :param esiost_args: the object representing the command line arguments.
285 fw_arm_entry_byte = input_file.read(4)
290 fw_arm_entry_byte = input_file.read(4)
304 print(f'- HDR - FW Entry point - Offset '
305 f'{HDR_FW_ENTRY_POINT_OFFSET} - '
309 """Computes the SHA-256 digest of a file using hashlib.
312 :return: The SHA-256 digest of the file as a bytearray.
316 # Read and update hash string value in blocks of 4K
317 for byte_block in iter(lambda: f.read(4096), b""):
327 :param esiost_args: the object representing the command line arguments.
337 print(f'- HDR - FW Length - Offset '
338 f'{HDR_FW_LENGTH_OFFSET} - '
348 :param esiost_args: the object representing the command line arguments.
353 # Read and update hash string value in blocks of 4K
354 for byte_block in iter(lambda: f.read(4096), b""):
370 :param esiost_args: the object representing the command line arguments.
410 print(f'- HDR - Segment1 start address - Offset '
411 f'{HDR_FW_SEG1_START_OFFSET} - '
413 print(f'- HDR - Segment1 size - Offset '
414 f'{HDR_FW_SEG1_SIZE_OFFSET} - '
416 print(f'- HDR - Segment2 start address - Offset '
417 f'{HDR_FW_SEG2_START_OFFSET} - '
419 print(f'- HDR - Segment2 size - Offset '
420 f'{HDR_FW_SEG2_SIZE_OFFSET} - '
422 print(f'- HDR - Segment3 start address - Offset '
423 f'{HDR_FW_SEG3_START_OFFSET} - '
425 print(f'- HDR - Segment3 size - Offset '
426 f'{HDR_FW_SEG3_SIZE_OFFSET} - '
428 print(f'- HDR - Segment4 start address - Offset '
429 f'{HDR_FW_SEG4_START_OFFSET} - '
431 print(f'- HDR - Segment4 size - Offset '
432 f'{HDR_FW_SEG4_SIZE_OFFSET} - '
441 :param esiost_args: the object representing the command line arguments.
455 :param esiost_args: the object representing the command line arguments.
462 seg1_start = int.from_bytes(output_file.read(4), "little")
464 seg1_size = int.from_bytes(output_file.read(4), "little")
467 seg1_data = output_file.read(seg1_size)
483 # Read and update hash string value in blocks of 4K
484 for byte_block in iter(lambda: output_file.read(4096), b""):
500 :param esiost_args: the object representing the command line arguments.
506 fw_arm_entry_byte = firmware_image.read(4)
513 fw_arm_entry_byte = firmware_image.read(4)
519 input_file_size = Path(esiost_args.input).stat().st_size - HEADER_SIZE