Discussion:
[9fans] Realtime clock on the Raspberry Pi
(too old to reply)
Holger Sebert
2013-08-17 12:07:35 UTC
Permalink
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
2013-08-17 13:30:14 UTC
Permalink
Post by Holger Sebert
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...

Loading...