Skip to main content.

14.3.25. Use NTP to synchronize system time against RTC

If a system has a real-time clock (RTC) this is often used only to initialize the system time when the system boots. From then, the system time is running independently. The RTC will probably only be used again at shutdown to save the current system time. Such a configuration is used in many workstation configurations. It is useful if time is not really critical, or if the system time is synchronized against some externel reference clock like when using the Network Time Protocol (NTP) to access time servers on the network.

But some systems provide a high-accuracy real-time clock (RTC) while the system clocks are not as accurate, and sometimes permanent access to the net is not possible or wanted. In such systems it makes more sense to use the RTC as reference clock (Stratum 1 NTP server - cf. http://www.ntp.org/). To enable this mode of operation you must edit the NTP daemon's configuration file /etc/ntp.conf in your target's root filesystem. Replace the lines

        server  127.127.1.0     # local clock
        fudge   127.127.1.0 stratum 10 
by
        server 127.127.43.0     # standard Linux RTC
Then make sure to start the NTP daemon on your target by adding it to the corresponding init scripts and restart it if it is already running.

ALERT! The "address" of the RTC (127.127.43.0 in the example above) is not an IP address, but actually used as an index into an internal array of supported reference clocks in the NTP daemon code. You may need to check with your ntpd implementation if the example above does not work as expected.

14.3.24. Boot-Time Configuration of MTD Partitions 1. Abstract 14.3.26. Configure Linux for XIP (Execution In Place)
Prev Home Next