Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwclock[TIME plugins] failed to execute #110

Closed
xhebox opened this issue May 6, 2018 · 7 comments
Closed

hwclock[TIME plugins] failed to execute #110

xhebox opened this issue May 6, 2018 · 7 comments
Assignees
Milestone

Comments

@xhebox
Copy link
Contributor

xhebox commented May 6, 2018

But it works once my system get started. My guess is that it lacks a /dev/xxx before udevd started. Do you have any idea on how to adjust the order?

@xhebox xhebox changed the title hwclock failed to execute hwclock[TIME plugins] failed to execute May 6, 2018
@troglobit
Copy link
Owner

Hmm, that should not be a problem as long as the kernel is built with CONFIG_DEVTMPFS, which is strongly recommended for other purposes as well ... or maybe you don't have a /dev/rtc0 module loaded?

@xhebox
Copy link
Contributor Author

xhebox commented May 8, 2018

Confirm. My suggestion is making it a task.

EDIT: btw, i think this should be changed to a run/task too, since udevd may not run at the time.

/* Debian has this little script to copy generated rules while the system was read-only */
        if (udev && fexist("/lib/udev/udev-finish"))
                run_interactive("/lib/udev/udev-finish", "Finalizing udev");

@troglobit
Copy link
Owner

The hwclock plugin could possibly as a task ... but for my embedded systems I'd really want it to run as soon as possible so kernel + userspace have the correct time. But I'll look into it.

The udev-finish thing is currently not possible to move to a run/task because the event loop starts too late. I've been meaning to try to start the event loop much earlier to facilitate relocating parts of the boot process to run/tasklets in the bootstrap runlevel. It's on the TODO list ... sorry.

@xhebox
Copy link
Contributor Author

xhebox commented May 8, 2018

I see, maybe make both methods available at the same time, that's also a good workaround. But yes, redesign to let event loop start really earlier is the best solution. We could even make a more generic system to replace plugin&service system if that's possible, so that tty/plugin in c/service/task or so, could all be controlled by one single system, simple and efficient.

It's not a big deal, no matter :).

@abucodonosor
Copy link
Contributor

@troglobit

I think you should check whatever /dev/rtc* exists before running
any hwclock commands.

If you don't find any just print a message an that is ..
'Hwclock plugin in use but missing kernel support , skipping.." .. or similar

@troglobit
Copy link
Owner

@abucodonosor Yup, and we should probably add .conf support for which /dev/rtcN to use (defaulting to /dev/rtc obvs.). The system could have several ...

@troglobit
Copy link
Owner

I believe this has been fixed, in two parts:

  • 744fdd6 - adds native support for RTC, skipping external hwclock tool
  • 1c6464a - adds automatic modprobe support to load RTC driver(s)

@troglobit troglobit added this to the v3.2 milestone Apr 10, 2020
@troglobit troglobit self-assigned this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants