-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
AP_ROMFS: tweak data storage to reduce size #26060
Conversation
I think it could be a good idea, but the lost of the checksum is an issue IMHO. If we can validate the data at compile time and have the whole flash integrity check to also check the embeded data I think that would be fine . Otherwise, having a bunch of memory without integrity check will be an issue |
This PR removes the uncompressed data CRC-32 from the GZIP footer, however, that was never checked by the existing code. There is still a CRC-32 of the uncompressed data stored in the Therefore, this PR does not change the way checksums are used in any way. I'm not sure if there's any checksum on the compressed data, that should be covered by whatever flash integrity checks are already in Ardupilot. |
Saves size not including unnecessary headers or code to parse them.
Ensure buffer is properly null terminated without changing the indicated size even for uncompressed data.
b6b1e1c
to
f1ca50e
Compare
Fixed the null termination issue. There are things that depend on it so I haven't removed it yet, though I may in the future. Rebased also and tested again on CubeOrange and looks good. |
looks good, thanks! |
Some nice size reductions and code simplifications. Save roughly 300 bytes depending on board. See commit messages for details.
Tested on a CubeOrange. Made sure that it can flash its own bootloader using the button in Mission Planner and that it still boots afterward.