Skip to content

Support per-unit lifecycle callbacks for library services - #8

Merged
JohnAmadis merged 5 commits into
choco-technologies:mainfrom
JaxCalder:feat/library-device-config
Oct 16, 2026
Merged

JohnAmadis merged 5 commits into
choco-technologies:mainfrom
JaxCalder:feat/library-device-config

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Support paired optional per-unit START/STOP DIF callbacks for type=library services, passing expanded arguments. Track unit activity independently of module enablement; stopping one unit keeps shared API consumers available. Plain libraries retain existing behavior.

Enable before DIF resolution for cold startup. Refresh inactive template arguments on a new device event so %v cannot retain an old path. Publish the generic contract in libsystemd_service.h.

Validation: libsystemd 62/62; systemd/service frontends 1/1 each; full Cortex-M7 build. STM32F746G-DISCO automatic library service startup after reset: UTC 6/6, RTC 12/12, RNG 6/6. Tests cover cold load separately from prior API enable, multiple units, failed starts, removal/re-add and changed paths.

Consumer: choco-technologies/dmutc#1. Release libsystemd with this header before building/releasing the consumer from public packages.

Related implementation PRs:

Additional dmboot integration regression: the existing CI Renode runner passed boot/log-ring access, UART/VFS, SD automount and persistence across remount, LCD and touch tests. A second run with the optional audio model also passed. A one-second 523 Hz tone completed with zero underruns; captured stereo channels agree and measure approximately 522 Hz.

The Renode network/TAP step was explicitly skipped because this host lacks root and a TUN device. Physical STM32F746G-DISCO checks passed DHCP, ping in both directions, telnet command execution and temporary root/SD file read/write. The ICMP library correctly rejects STOP while a dependent module uses it. The independent plain-library lifecycle regression passes; libsystemd now passes 63/63. No production code fixes were needed in this regression run. Raw validation logs remain local and are not published.

Follow-up network diagnosis: a single ping after idle returns 0/1; an immediate repeat returns 1/1. An outgoing board ping warming ARP is followed by 3/3 incoming responses. Released ICMP code sends replies inline on the sole RX pump, while its send path can block waiting for an ARP reply that this same pump must consume. This explains the cold-cache loss and predates these UTC/library-service changes. No networking implementation was changed. Network regression therefore remains qualified rather than declared loss-free.

The libsystemd GitHub CI passes with the 63-step suite. Raw logs remain local. Two small physical-board test files remain because rm is absent; installing an additional removal tool was rejected by automatic approval review. No extra executable was installed on the board.

@JohnAmadis
JohnAmadis merged commit 8f4c1cf into choco-technologies:main Oct 16, 2026
1 check 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