Jeff Cunningham wrote:
> I would like to set the system clock from it on boot up (via hwclock if
> possible).
> At the moment, I can't figure out how to do anything with it - read its
> time, set its time - anything.
If the clock hardware is supported under Linux (which it may be as you have a
/dev/rtc), you should have no problem. On the TS-7250 board I am using the
rcS.sysinit file contains the lines:
#set system clock here
if [ -f /proc/driver/rtc ]; then
echo "setting system clock"
/sbin/hwclock -s
date
fi
You should check for something similar on your board. You can test if running
hwclock sets the system time. If it works, you should check to see if the
start up scripts on your board include any call to hwclock. If there isn't
one, add it to rcS.sysinit or rc.local. You can set the system time on your
board by hand then use hwclock to write the system time to the RTC so your
board will give you the current time the next time you boot the board.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|