Author Topic: Date Keeping Problem  (Read 8896 times)

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Date Keeping Problem
« Reply #15 on: December 28, 2006, 09:28:58 am »
Quote
I believe the issue with the c760's is that there is a script that runs at shutdown... that syncs system clock to hardware clock (RTC)... well for some reason "hwclock" wasn't include in that model sets rom... I will have to talk to sash to confirm... but if that is the issue it will be included in the next release...

Late
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149309\"][{POST_SNAPBACK}][/a][/div]

What I'm doing is a little diffrent from what you just said, but if this workaround I'm suggesting is accepted as effective I'd be proud if it makes it to the next release.

What I'm doing is (which is just one possible workaround):
on shutdown I'm writing the current system date and time to a file, in a human readable format, so that on next reboot it can be read and used to set up the system date. This is what the scrip, I suggested at the begining, does respectively with the start and stop options.

In order to avoid having to modify /etc/rc.d/rc script you could add the necessary stuff to the "start" case so that it could run properly with the kill stuff in runlevels 0 and 6 (I guess it boils down to creating some file in the var tree). I do not want to do this because I'm concidering writing BSD style init scripts for my c760 as soon as I get some other things straight.

PS: yes I love Slackware
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Date Keeping Problem
« Reply #16 on: February 17, 2007, 01:15:50 pm »
I spent a little more time thinking on this:
The c7xx/860 do have hardware clock (or at least something that linux recognises as RTC), I've no idea why on the 2.6 open kernels it still gets reset on reboot (this is not a good thing to do).
The sole porouse ot the hardware clock is to keep time while linux is not running, but if when linux starts it resets the hardware clock before reading it what's the point.
This may be dew to the fact that the content of the clock may be unpredictable if it suffered from power loss (but if the hwclock designer was smart it should self reset itself to unixepoch {or some other fixed time} when powered up)... I'm not sure .... any one konw why it gets reset on reboot ?

Any way it would be nice if one could read bothe from a saved file and from hardware clock, then set the system clock to the newer of the two.

Anyone know why the hwclock feature has been removed from pdaXrom's busybox ?
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Date Keeping Problem
« Reply #17 on: September 01, 2007, 05:03:14 am »
I had a talk a while back with the sa1100-rtc kernel driver writer ... and apparently there is not much that can be don to avoid the reset upon reboot ... (hope to find the time to confirm this from pxa tech doc in the mean time I'll take his word for it).

What I found out is that altough the /etc/apm stuf has become mostly obsolete with 2.6 kernels, apmd can be made do similar things ... so there is a way to keep a realtively updated system time backup file (by updating it every suspend and resume).
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing