Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] Realtime clock on the Raspberry Pi

79 views
Skip to first unread message

Holger Sebert

unread,
Aug 17, 2013, 8:07:35 AM8/17/13
to
Hello,

I have upgraded my Raspberry Pi with a RasClock:

http://afterthoughtsoftware.com/products/rasclock

In order to use, I put the following line into my profile:

bind -a '#r' /dev

The realtime-clock seems to be successfully recognized
by the system as device /dev/rtc. However, Plan 9 does
not seem to use it; after every reboot the date and
time is reset.

What futher steps are neccessary to make Plan 9 fully
aware of the RTC?

Best,
Holger

Richard Miller

unread,
Aug 17, 2013, 9:30:14 AM8/17/13
to
> In order to use, I put the following line into my profile:
>
> bind -a '#r' /dev
>
> The realtime-clock seems to be successfully recognized
> by the system as device /dev/rtc. However, Plan 9 does
> not seem to use it; after every reboot the date and
> time is reset.

The '#r' device for the raspberry pi (/sys/src/9/bcm/devfakertc.c)
is not an actual clock driver, just a hack to prevent annoying prompts
for date and time when booting by using the kernel build time as an
initial guess. It probably wasn't a good idea, because if you aren't
connected to a network to get the time corrected by aux/timesync,
your clock will go backwards every time you boot. This confuses things
like "mk".

If you want to use the RasClock (looks like a useful device), you
(or somebody) will need to write a driver for it.

And if anyone wants to stop being misled by the fakertc device, just
comment it out in /sys/src/9/bcm/pi and build a new kernel...

0 new messages