Bug#855203: hwclock-set: Synchronize from hwclock despite systemd presence

Chris Hofstaedtler zeha at debian.org
Sun Dec 27 22:39:12 GMT 2020


Hi,

* Lukas Wunner <lukas at wunner.de>:
> Back in 2011, hwclock-set was amended to bail out if systemd is present.
> According to #629811 the rationale was that "systemd > 25 sets the
> hwclock itself, based on the contents of /etc/adjtime, so
> /lib/udev/hwclock-set should not do anything if running under systemd."
[..]
> But this doesn't work if the driver for the RTC is compiled as a module
> or if the kernel was compiled with CONFIG_RTC_HCTOSYS disabled.  One use
> case where both of these prerequisites are not met is the Raspberry Pi:
> Raspbian ships with a kernel which disables CONFIG_RTC_HCTOSYS and also
> compiles all RTC drivers as a module.  This makes sense because the
> Raspberry Pi does not possess an RTC.  Instead, people use add-on boards
> with various types of clocks and it wouldn't be reasonable to link all
> of their drivers into the kernel.

Is this still a problem on current Raspbian / current Raspberry Pis?

If so, does the RTC (once the module is loaded), appear as rtc0?

If all of this is true, I would ponder accepting a tight patch to
the hwclock-set udev helper. The helper should really only run when
hctosys did not happen yet.
One would still need to rely on something else for updating the RTC
later or on shutdown.

CC-ing pkg-systemd-maintainers for their input.

Chris



More information about the Pkg-systemd-maintainers mailing list