-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
gzStreamUpdater update finishes successfully, but MD5 checksums do not match #68
Comments
I am particularly interested in why you are altering the stream size here:
|
hi, thanks for your feedback 👍 I'm not sure why GZUnpacker->gzStreamUpdater( (Stream *)&mGzFile, UPDATE_SIZE_UNKNOWN, 0, false ); An ota partition size must be a multiple of 4096, so it may be padded with zeroes depending on the remaining bytes in the last gzip buffer, as a result the effective update size may differ from the binary size. |
Thanks for a quick reply @tobozo !
Are you padding the buffer with 0's in your code? |
The MD5 calculation does not need to be aligned to 4K. From the Updater class:
So the difference might be coming from the fact that all buffer lengths do not add up to the file size |
I also noticed that I am on 1.1.4 and your master is different. Will try that. |
btw the new https://github.com/tobozo/ESP32-targz/blob/master/src/ESP32-targz-lib.hpp#L311-L383 |
Hi @tobozo
Thank you for this library! I know what it means to maintain an open-source library, so your effort is really appreciated!
I came across an issue that maybe you have some insight into:
I am updating esp32 firmware using your library based on the gzip file delivered to the device over OTA.
The update actually ends up being successful (and the fimrware works!), but the resulting MD5 from the Update class does not match the calculated MD5 of the binary inside the gzip file. Any idea why this might be the case?
Here is the code snippet - nothing fancy - straight from one of your examples.
I browsed through your code, and you seem to have Update.begin() and Update.write() and Update.end(true) in exactly the same places I would put them, and yet:
Any ideas/suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered: