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

Handle broken RTC #794

Closed
troglobit opened this issue Nov 1, 2024 · 0 comments · Fixed by #796
Closed

Handle broken RTC #794

troglobit opened this issue Nov 1, 2024 · 0 comments · Fixed by #796
Assignees
Labels
enhancement New feature or request

Comments

@troglobit
Copy link
Contributor

Infix needs to handle platforms with broken RTC better. "Broken" in this case means a non-battery backed RTC that at power-on start up with a completely random time in the future, which leads to skipping back in time when the NTP client synchronizes the system clock.

  • On platforms where cold start can be detected, and have this problem, we should clear the RTC
  • On platforms where cold start cannot be detected, we should disable the RTC
    • Disable the driver, or
    • Disable the node in the device tree
  • When the system starts, detecting a missing /dev/rtc (and others) should restore from a file instead
  • Periodically (every 11 mins, like the kernel) save system time to a file

The latter two can be handled by extending the RTC plugin in Finit, see troglobit/finit#418

@troglobit troglobit added the enhancement New feature or request label Nov 1, 2024
@troglobit troglobit added this to the Infix v24.10.2 milestone Nov 1, 2024
@troglobit troglobit self-assigned this Nov 1, 2024
@troglobit troglobit moved this to In progress in Infix & C:o Nov 1, 2024
troglobit added a commit that referenced this issue Nov 3, 2024
Backport support for saving and restoring system time from a file on
systems with broken RTC that reset to the future.

With this support a system can be sure time only ever moves forward.

Fix #794

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit linked a pull request Nov 3, 2024 that will close this issue
17 tasks
troglobit added a commit that referenced this issue Nov 3, 2024
Backport support for saving and restoring system time from a file on
systems with broken RTC that reset to the future.

With this support a system can be sure time only ever moves forward.

Fix #794

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Nov 4, 2024
Backport support for saving and restoring system time from a file on
systems with broken RTC that reset to the future.

With this support a system can be sure time only ever moves forward.

Fix #794

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@github-project-automation github-project-automation bot moved this from In progress to Done in Infix & C:o Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant