Skip to content

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
JohnAmadis merged 2 commits into
masterfrom
feat/bump-dmod-deflate
Oct 28, 2026
Merged

JohnAmadis merged 2 commits into
masterfrom
feat/bump-dmod-deflate

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

lib/dmod → dmod 8264cbb (develop after #341), and one more safe.directory in 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 deflate method (PRs to the modules follow), a firmware without the decoder cannot load them – this has to be merged before the first such release.

  • The deflate method of Dmod_Compression_* (decoder by dmcomp, a submodule of dmod – a clone needs --recursive, the CI checkouts already do it).
  • The SAL Dmod_FirmwareReady, Dmod_WritePersistency, Dmod_ReadPersistency (here they answer -ENOSYS until the selector implements them).
  • The old pin (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 /ext repacked with deflate (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.dmp image
master (FastLZ) 216 499 B 382 883 B
this PR 178 311 B 347 307 B (−35.6 kB)

32 of the 35 modules of the image are deflate; dmini, dmhaman and dm_sw_ring are still FastLZ (no release with the new method yet, ~2.5 kB more to gain). The board boots with its own modules in deflate: 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: master has the dmf-get of the old lib/dmod, which cannot read a deflate package, 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

…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>
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
JohnAmadis merged commit 5db4edd into master Oct 28, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants