Search code examples
linuxembeddedreal-time-clock

can linux run without an RTC present on an embedded platform?


When running linux on an embedded platform, is a RTC required? In other words, does the kernel itself or drivers require an RTC to be present?


Solution

  • The Raspberry Pi is an example of a Linux system with no RTC. It gets time via NTP if it is connected to the internet, otherwise it must be set manually, but it runs nonetheless albeit with possibly incorrect time/date.

    It is entirely possible to use a start-up script that prompts the user for time/date at start-up and set using the date command, or to get time date from some other source such as a connected GPS or other networked time source.

    If time is never set, it will start from 0000hrs 1 January 1970 at start-up, and increment normally while power is maintained and the system is not reset, so you can continue to use wall time to measure time periods, but not to determine actual time. So for example tools such as chron will continue to work in some fashion.