Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Boots a gzip-compressed, signed image, optionally encrypted at rest. Both A/B slots stay compressed and the selected one is inflated into RAM and executed there, so A/B redundancy costs about half the flash of two uncompressed slots. Rollback is unchanged. Enabled with
COMPRESSED_IMAGES=1, reusing the existingsrc/gzip.cinflater. The signature covers the compressed bytes, so corruption is caught before the decompressor runs.What it adds
src/update_ram.c- manifest TLVs, capacity and overlap checks, inflate toWOLFBOOT_LOAD_ADDRESSsrc/compress_crypt.c- optional at-rest encryption of both slots: long-lived key, per-slot keystreamtools/keytools/sign.c---compressedand--encrypt-iv-offset; validates an already-gzipped payload rather than compressingdocs/Compression.md, simulator tests and CIFixes in shared code
wolfBoot_success()confirmedPART_BOOTunconditionally, so an image booted from the update slot was discarded on the next bootDEBUG_UART=1onTARGET=stm32f4hung on the first print, because nothing initialized the portTesting
Validated on a NUCLEO-F439ZI: verify in place, inflate, execute from RAM, A/B selection by version, and fallback from a corrupted slot. Encryption is simulator-only. Simulator tests cover both gzip decoders, ED25519/ECC256 and ChaCha20/AES-128/AES-256.