Repository navigation
lib/dmod: dmod with the deflate method and the firmware SAL (the firmware has to read deflate before the modules are released in it) - #151
Merged
Conversation
…rmware SAL The firmware loads the modules with the decoder of dmod, so it has to be able to read "deflate" before the modules are released in it (the packages of the registry are taken as they are, the latest ones). dmod 8264cbb (#341) has it: the "deflate" method of Dmod_Compression_* by dmcomp (a submodule of dmod, which is why a clone needs --recursive; the workflow gets one more safe.directory for it) and the SAL Dmod_FirmwareReady, Dmod_WritePersistency, Dmod_ReadPersistency (-ENOSYS here, for now). The old pin (714c926) is contained in the new one. The firmware: +2.6 kB of code (the decoder; the encoder is not built without the standard library) until its modules are repacked. Checked on the STM32F746G-DISCO: all the modules of /ext repacked with deflate (82 of them, 459 kB -> 376 kB), the services start (carhmi, networkd, dmview, dmaudio, automount, the SD card). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
Merged
Merged
Merged
Measured on the STM32F746G-DISCO build with dmod 8264cbb and the latest packages of the registry: the image is 347 307 B (MinSizeRel), modules.dmp 178 311 B (it was 216 499 B with FastLZ, 382 883 B for the whole image). The note about the tools: an old dmf-get does not read deflate and silently takes the previous release of a module. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
JohnAmadis
approved these changes
Oct 28, 2026
JohnAmadis
approved these changes
Oct 28, 2026
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.
What
lib/dmod→ dmod8264cbb(develop after #341), and one moresafe.directoryin the workflow for the nested submodule (lib/dmod/lib/third-party/dmcomp).Why
The firmware loads the modules with dmod's decoder, and the packages of the registry are taken as they are (the latest ones). Once the modules are released with the
deflatemethod (PRs to the modules follow), a firmware without the decoder cannot load them – this has to be merged before the first such release.deflatemethod ofDmod_Compression_*(decoder by dmcomp, a submodule of dmod – a clone needs--recursive, the CI checkouts already do it).Dmod_FirmwareReady,Dmod_WritePersistency,Dmod_ReadPersistency(here they answer-ENOSYSuntil the selector implements them).714c926) is contained in the new one.Effect on the firmware
+2.6 kB of code (the decoder; the encoder is not built without the standard library – no change in the configuration of dmod-boot).
stm32f746g-disco,MinSizeRel: 382 883 B → 385 495 B, until the modules in the image are repacked (−42 kB; a separate step).Tested on the board
STM32F746G-DISCO, this firmware and all the modules of
/extrepacked withdeflate(82 of them, 459 kB → 376 kB),upload-ext, reboot://tmp, the services run (carhmi, networkd, dmview, dmaudio, dmdevmon, automount), the SD card is mounted; no decompression error in the log.Result (checked after the modules were released with
deflate)Fresh build for the
stm32f746g-disco(MinSizeRel), dmod 8264cbb, the latest registry packages:modules.dmp32 of the 35 modules of the image are
deflate;dmini,dmhamananddm_sw_ringare still FastLZ (no release with the new method yet, ~2.5 kB more to gain). The board boots with its own modules indeflate: the services start, the SD card is mounted, no decompression error in the log.Without this PR the gain does not happen, and nothing fails:
masterhas thedmf-getof the oldlib/dmod, which cannot read adeflatepackage, calls it incompatible and takes the previous (FastLZ) release of the module – the build stays on the old module versions. The second commit documents it.🤖 Generated with Claude Code