12-18-2019, 01:56 PM
(12-18-2019, 01:31 PM)DrYak Wrote:(12-18-2019, 12:06 PM)tsys Wrote: The broken load order of the rtc subsystem is probably an issue, too though. Imho hctosys is missing a mechanism to defer loading unti the rtc dev appears. Adding the RTC module as a builtin does result in the correct load order since it uses a late initcall. I'm not sure I like that solution though.
I was suggesting the builtin route, because it follows the same solution path that CMOS RTC is doing on PC-compatible class hardware.
But if you prefer not to do it, then the best strategy would be to use UDEV rules to manually call the hctosys, or compile *that* one as module (is it possible) and load the module right after /dev/rtc0 shows up (again, courtesy of some udev rule).
It's basically way to force the *deferring until rtc dev appears* part.
I have now made the rk808 rtc module a builtin. However I do still think the hctosys code just is not particularly good. Using a udev rule has some drawbacks like not updating the system clock on resume from suspend and that kind of stuff. Thus it would then need some systemd integration, too. I just don't think that is worth the hassle.