Closed delijati closed 1 month ago
Manjaro
4.7.0
Python 3.12
No response
https://github.com/espressif/esptool/blame/d83dd3be6e961ce97ba49f1b1e17a98a68ff2ef5/esptool/bin_image.py#L709
should be
if isinstance(segment, ELFSection) and segment.name == ".dram0.bootdesc":
I have a function that fixes the checksum of an OTA update image:
def fix_image(data, filename): global DRAM0_DATA_START, DRAM0_DATA_END try: f = io.BytesIO(data) image = esptool.bin_image.ESP32FirmwareImage(f) # calculate_checksum except Exception as inst: print("Failed to parse : " + filename) print(inst) return False print("Image version: {}".format(image.version)) # TODO https://github.com/espressif/esptool/issues/994 for seg in image.segments: if if_addr_in_seg(image, seg.addr, "DROM"): seg_app_data = ESP_APP_DESC_STRUCT(seg.data) print("App data: {}".format(seg_app_data)) fixed_image = None fixed_filename = filename + ".fixed" image.save(fixed_filename) with open(fixed_filename, "rb") as f: fixed_image = f.read() output_image = fixed_image + data[len(fixed_image) : len(data)] with open(fixed_filename, "wb") as f: f.write(output_image) return True
Hi @delijati, thank you for the report, we will try to fix this as soon as possible.
Operating System
Manjaro
Esptool Version
4.7.0
Python Version
Python 3.12
Full Esptool Command Line that Was Run
No response
Esptool Output
No response
What is the Expected Behaviour?
https://github.com/espressif/esptool/blame/d83dd3be6e961ce97ba49f1b1e17a98a68ff2ef5/esptool/bin_image.py#L709
should be
if isinstance(segment, ELFSection) and segment.name == ".dram0.bootdesc":
I have a function that fixes the checksum of an OTA update image:
More Information
No response
Other Steps to Reproduce
No response