Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is meant to prevent flashing of firmware files that are missing some data after being transferred across the USB serial port. The currently flash image validation code in firmware does not validate the checksum of files that are less than 1MB, because it is assumed that it's an older firmware version that did not have a checksum.
The PR adds the following additional validation:
If the firmware flash image has a valid info area with HACKRFFW signature, the version number in the info area is checked to see if it's a version that is know to be 1MB and to have a valid checksum. Firmware versions that must be 1MB and have a valid checksum (or will be rejected) are:
Caveat: If a developer test build (with a git tag for the version string) is less than 1MB, its checksum won't be checked, because they don't have a "." or "n_" in the version string. Perhaps in the future we should also add a signature in the image header to indicate it's a version that should have a checksum.
Test version on Discord (revised):
https://discord.com/channels/719669764804444213/722101917135798312/1208820528207626280