Only /dev/rtc0 is going to be updated automatically.  /dev/rtc1 is not 
going to be updated automatically, as far as I can determine, with the 
Debian distributions as published.
You would have to use the config tools to switch from rtc0 to rtc1 and 
compile a new kernel.

So the common scheme you will find, for example, at the Adafruit site uses 
a script which is run by systemd to set the system time from /dev/rtc1.
This will happen soon after boot, but I am not precisely sure when.

An important point is that "system time" is what matters.  That is what you 
will see with the date command.

So the common scripts use the hwclock command with option --rtc /dev/rtc1 
(this is same as -f option) to set the system time.
So you have to assume /dev/rtc1 has been set accurately.

The best way to set the /dev/rtc1 is to use the hwclock -w /dev/rtc1 
command with the device connected to the internet and accurate NTP time 
being in force.
This command writes the system time to the RTC.  So if the system time is 
correct, the RTC time will be correct.  This is like setting any clock. 
 Thanks to the RTC having a battery, it will maintain time with Beagleboard 
power going off.
This can also be done manually at the command line if you don't have an 
internet connection (but you have another accurate time source).

So basically the common scripts floating around out there overwrite the 
system time which was set automatically with the time provided by the RTC 
/dev/rtc1.

Note that there is a compensation system for the RTC which is also included 
in the system.  I'm still working out the details on how to understand and 
manage what it is doing.  What I am doing for now is periodically rebooting 
my BBGW with it connected to the internet + NTP.  The compensation scheme 
is working, but the system time is running a little bit fast.

Greg

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3ecc7c60-d153-44ee-a593-7e0f50146268%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to