Skip to content

release: compress the modules with deflate (-20 % of the size) - #7

Merged
JohnAmadis merged 3 commits into
mainfrom
ci/release-with-deflate
Oct 28, 2026
Merged

JohnAmadis merged 3 commits into
mainfrom
ci/release-with-deflate

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

The release workflow builds the package with -DDMOD_COMPRESSION_METHOD=deflate: the .dmfc files of the release are compressed with DEFLATE (RFC 1951, dmcomp) instead of FastLZ. One line in release.yml, nothing else; CI and local builds keep the default (fastlz).

Why

The modules of the internal flash of the dmod-boot firmware are 172 kB with deflate, 215 kB with FastLZ (−42 kB, −20 %); the flash is needed for two firmware banks. The decoder is 1.7 kB of code in the loader (dmod ≥ 8264cbb, dmod#341; the chocotechnologies/dmod image has it).

Order of merging

A loader without the deflate decoder cannot read such a package. Merge dmod-boot#151 (the firmware gets the decoder) before the first release made with this change – dmod-boot takes the latest packages from the registry. Merging this PR changes nothing until the next release is made.

Tested

The build of the workflow (cmake .. -DDMOD_TOOLS_NAME=... -DDMOD_COMPRESSION_METHOD=deflate, dmod from develop by FetchContent, todmfc of the image) gives .dmfc files with deflate in the header (dmffs: 11 188 → 6 619 B); the modules of /ext repacked this way run on the STM32F746G-DISCO.

Also: the CI uses the dmod_loader of the image

The step "Build dmod_loader from dmod develop" is gone: the chocotechnologies/dmod image is built from dmod develop now, so its dmod_loader has the 64-bit file API (dmod#312), which is what the step was for. It would also fail since dmod#341 (dmod keeps its compression library in a git submodule; a clone without --recursive cannot be configured). The tests call dmod_loader from the image.

🤖 Generated with Claude Code

The packages of a release are built with -DDMOD_COMPRESSION_METHOD=deflate (RFC 1951, by
dmcomp): the .dmfc files are ~20 % smaller than the fastlz ones - the modules of the
internal flash of the dmod-boot firmware, 215 kB with FastLZ, are 172 kB. CI and the local
builds keep the default (fastlz). A loader needs the deflate decoder (dmod >= 8264cbb,
dmod-boot#151), so this should be released after the firmware has it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
JaxCalder and others added 2 commits October 28, 2026 15:34
dmod keeps the dmcomp library (the deflate compression method) in a git submodule since
dmod#341: a clone without --recursive has an empty lib/third-party/dmcomp and the
configuration of dmod stops there. The step that builds dmod_loader from dmod develop
clones it with --recursive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The chocotechnologies/dmod image is built from dmod develop now, so its dmod_loader has the
64-bit file API (dmod#312) and the step that cloned and built a dmod_loader of its own is not
needed (it also had to clone dmod with its submodules since dmod#341). The tests call the
dmod_loader of the image.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@JohnAmadis
JohnAmadis merged commit 161d0a2 into main Oct 28, 2026
3 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