Repository navigation
Conversation
dgarske
force-pushed
the
compressed_images
branch
from
October 27, 2026 19:09
024b841 to
336ec0d
Compare
dgarske
force-pushed
the
compressed_images
branch
from
October 28, 2026 03:03
336ec0d to
91c3ae7
Compare
dgarske
force-pushed
the
compressed_images
branch
2 times, most recently
from
October 28, 2026 20:54
9cd5e75 to
2fdd41a
Compare
dgarske
force-pushed
the
compressed_images
branch
from
October 28, 2026 22:07
2fdd41a to
1171a22
Compare
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
COMPRESSED_UPDATE=1holds the update partition as a gzip-compressed, signed image and inflates it into the boot partition, which goes on executing in place. The update partition is then sized for the container rather than for a second full copy, and the flash that frees goes to the application: on a 2MB STM32 the example configs give the application 1MB where an equal split of the same space allows 896KB.There is no local copy of the outgoing image, so this trades rollback for flash. Three things bound that: the container is verified before the first erase, so a bad image never touches the running one; the update partition is only ever read during an install, so a power cut leaves an intact source and the next boot resumes from the recorded progress; and the payload is a complete signed image, so the boot partition stays an ordinary wolfBoot partition that the normal boot path verifies, meaning the inflater need not be trusted.
What it adds
src/update_flash.c- the installer, built on the existingDISABLE_BACKUPpathsrc/gzip.c- a sink decoder with a bounded LZ77 window, selected at build time, leaving the flat decoder the FIT path uses unchangedtools/keytools/sign.c---compress[=bits], which compresses and signs the nested container; zlib is an optional dependency and the option is rejected without itWOLFBOOT_PARTITION_UPDATE_SIZEsmaller than the boot partition, which the existing monolithic self-update sizing already allowed in the other directiondocs/Compression.md, simulator tests, unit tests and CIFixes in shared code
wb_trailer_clear()cleared the update partition's trailer at the boot partition's size offset, which matters once the two are sized independentlyhal/stm32f4.cdescribes 1MB of flash, so a partition past that silently failed to erase; now refused at build timeDEBUG_UART=1onTARGET=stm32f4hung on the first print, because nothing initialized the portTesting
Validated on a NUCLEO-F439ZI: install, verification of the installed image, the update being consumed rather than repeated, and resume after an install interrupted by reset. Simulator and unit tests cover the sink decoder against the flat one at every window size, the installer's bounds, and the manifest reader.