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

Lennart Poettering lennart at poettering.net
Thu Feb 27 09:56:30 PST 2014


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?

> 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


More information about the systemd-devel mailing list