[systemd-devel] RTC on BeagleBone Black or embedded platforms

Koen Kooi koen at dominion.thruhere.net
Fri Feb 28 02:13:45 PST 2014


Op 27 feb. 2014, om 18:56 heeft Lennart Poettering <lennart at poettering.net> het volgende geschreven:

> On Thu, 27.02.14 10:46, Mike (bellyacres at gmail.com) wrote:
> 
> Heya,
> 
>> My biggest dilemma at this time right now is with the RTC.  The
>> BeagleBone Black does have a RTC and it gets assigned to /dev/rtc0.
>> There is however no battery backup for this device.  I've added a
> 
> Hmm, what's the point of such an RTC? I mean, Linux uses an RTC only to
> initialize the system clock from and then never looks at it again. But
> if the RTC has no battery it's entirely pointless to ever look at it, so
> what is an RTC good for that has no battery?

To prevent clock-drift, the RTC does a better job at that than the kernel. Personally, I just have my DHCP server provide an ntp entry and have connman do its ntp thing :)

regards,

Koen

> 
>> DS1307 with a battery to allow having a somewhat sane date
>> maintained.  Therein lies the dilemma, the code is only setup to
>> access /dev/rtc.  I'm sure that I can figure out with a (gasp) shell
>> script or small c program how to set / get the date from the DS1307,
>> it just seems that would be a very crude kludge.
> 
> If you have two RTCs one of which has no battery, why expose that to
> userspace at all? Can't you just disable that driver, and only use the
> working onen?
> 
>> My question then is would it be considered to add options to the
>> current timedated code that accepted device name and possibly path
>> to the appropriate /etc/adjtime file?
> 
> It really sounds as if this is a local configuration problem of what is
> exposed by the kernel...
> 
> Also note that PID will do the initial timezone bump for /dev/rtc only,
> too. Supporting an alternative RTC would also mean we'd ave t touch the
> earliest boot code.
> 
> Lennart
> 
> -- 
> Lennart Poettering, Red Hat
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 



More information about the systemd-devel mailing list