Skip to content

Implement UTC library with rule-driven RTC services - #1

Merged
JohnAmadis merged 2 commits into
mainfrom
feat/utc-library
Oct 16, 2026
Merged

JohnAmadis merged 2 commits into
mainfrom
feat/utc-library

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Implement UTC as a Library module without a hardware port or driver registration. Provide signed 64-bit Unix/Gregorian conversion and generic RTC access through VFS.

RTC selection uses dmdevfs device events: the packaged [class=rtc] rule starts dmutc@%name; its type=library template passes %v to the service lifecycle. No default device path or public bind API. START validates and copies a source, STOP waits for in-flight I/O and removes only that unit. Multiple sources use deterministic unit-name order; no source returns ENODEV. Conversion APIs work without RTC.

Validation: native ctest 2/2 (conversion 4/4, provider model 6/6 including concurrent STOP/read), Cortex-M4/M7 builds. STM32F746G-DISCO after reset: automatic dmutc@rtc running with pid=0; UTC 6/6, RTC 12/12, RNG 6/6. Tests include stopping while RTC still exists and rejecting/recovering a changed-path re-add. Console evidence and hashes are in docs/testing.md. PC UTC restored; no authenticated-time claim.

Dependencies remain unversioned. Public package CI needs the new libsystemd_service.h release. Local validation uses ignored build-only manifests. Release generic library lifecycle and RTC reporting first, then dmutc, registry and boot integration.

Related implementation PRs:

Current public CI confirms the release dependency: compilation stops at libsystemd_service.h: No such file or directory. Local host/M4/M7 builds use the actual new header from the libsystemd package and pass. No compatibility shim or source pin is added.

@JohnAmadis
JohnAmadis merged commit 5093810 into main Oct 16, 2026
3 of 6 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