Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add firmware image checksum generation #156

Open
3 tasks done
jp-bennett opened this issue Oct 6, 2024 · 0 comments
Open
3 tasks done

Add firmware image checksum generation #156

jp-bennett opened this issue Oct 6, 2024 · 0 comments

Comments

@jp-bennett
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Described the feature in detail and justified the reason for the request.
  • Provided specific use cases and examples.

Feature description

While the esptool-js library has a checksum function, there isn't a way to generate a checksum of an entire flashable image, the way esptool image_info does. It would be very useful to have such a function, to generate the firmware image checksum before flashing.

Use cases

The most common use case would be to check for a valid checksum before flashing a firmware.bin to a device. In my exact use case, I'm trying to modify firmware to replace an internal string just before flashing. I've confirmed this works using sed and then manually updating the checksum with a hex editor, but haven't found a way to do so automatically in the browser.

Alternatives

There's not really an alternative to make this work. To support the feature, more code needs to be ported from esptool.py to esptool-js.

Additional context

Specifically this is for the Meshtastic project. We're putting a placeholder string in the firmware, and would like to replace it with a timezone string during the flashing process. There are quite a few other use cases we'd like to explore, but the timezone was an easy place to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant