Re: [OLPC-AU] hwclock accuracy
Very interesting. Strange. Unexpected. On Wed, Jan 26, 2011 at 11:30 PM, James Cameron qu...@laptop.org wrote: Until these problems are fixed, please change your build; Could this be added to http://wiki.laptop.org/go/OS_Builder#Recipes ? cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [OLPC-AU] hwclock accuracy
On Thu, 2011-01-27 at 09:01 -0500, Martin Langhoff wrote: Very interesting. Strange. Unexpected. On Wed, Jan 26, 2011 at 11:30 PM, James Cameron qu...@laptop.org wrote: Until these problems are fixed, please change your build; Could this be added to http://wiki.laptop.org/go/OS_Builder#Recipes ? I've split this into two parts, part of the build-system needs patching, modules/base/kspost.10.core.inc. The second part adds the rpm in the ini file, and uses the custom_scripts module to write changes to the image. http://dev.laptop.org.au/projects/xo-au/repository The two main files are examples/olpc-os-10.1.3-xo1.5AU.ini and setAU.sh Jerry diff --git a/modules/base/kspost.10.core.inc b/modules/base/kspost.10.core.inc index 4daa967..aecb68d 100644 --- a/modules/base/kspost.10.core.inc +++ b/modules/base/kspost.10.core.inc @@ -64,6 +64,14 @@ sed -i -e 's/TEMPORARY_STATE=no/TEMPORARY_STATE=yes/' \ # Remove resolv.conf from rwtab so that it can be updated atomically (#2748) sed -i -e /resolv.conf/d /etc/rwtab +# Remove adjtime from rwtab so that it can be updated atomically (#10605) +sed -i -e /adjtime/d /etc/rwtab + +# sigh.. must append UTC to /etc/adjtime or ntpdate writes localtime +cat EOF /etc/adjtime +UTC +EOF + # ensure temporary state directory doesn't get too fat (#9636) sed -i -e 's/RW_OPTIONS=/RW_OPTIONS=-o size=1M -o nr_inodes=1024/' /etc/sysconfig/readonly-root ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [OLPC-AU] hwclock accuracy
On Thu, 2011-01-27 at 15:30 +1100, James Cameron wrote: On Wed, Jan 26, 2011 at 06:09:02PM -0600, Jerry Vonau wrote: That actually makes things worse, try installing ntpdate and run it with the stock /etc/adjtime file, now the real time clock is set to localtime as that is the first time hwclock is run. http://osdir.com/ml/fedora-olpc-list/2009-08/msg00102.html http://dev.laptop.org/ticket/9705 http://dev.laptop.org/ticket/10605 in particular. Until these problems are fixed, please change your build; remove /etc/adjtime from /etc/rwtab, change the third line of /etc/adjtime to be UTC, copy the zoneinfo file for to /etc/localtime, install ntpdate, and write a script in /etc/NetworkManager/dispatcher.d/99-ntpdate Just thinking ahead, does any of this have any negative impact for olpc-update? Thinking /etc/adjtime should be treated the same way /etc/sysconfig/i18n is. Testing hasn't got that far, just curious. Jerry ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [OLPC-AU] hwclock accuracy
On Thu, 2011-01-20 at 14:40 -0500, Martin Langhoff wrote: On Thu, Jan 20, 2011 at 8:02 AM, Sridhar Dhanapalan srid...@laptop.org.au wrote: We've actually disabled the /sbin/hwclock --systohc in our latest build (probably to be released tomorrow). If you are spinning your own build, ensure ntpdate is installed. That should help significantly. cheers, That actually makes things worse, try installing ntpdate and run it with the stock /etc/adjtime file, now the real time clock is set to localtime as that is the first time hwclock is run. http://osdir.com/ml/fedora-olpc-list/2009-08/msg00102.html http://dev.laptop.org/ticket/9705 Jerry ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [OLPC-AU] hwclock accuracy
On Wed, Jan 26, 2011 at 06:09:02PM -0600, Jerry Vonau wrote: That actually makes things worse, try installing ntpdate and run it with the stock /etc/adjtime file, now the real time clock is set to localtime as that is the first time hwclock is run. http://osdir.com/ml/fedora-olpc-list/2009-08/msg00102.html http://dev.laptop.org/ticket/9705 http://dev.laptop.org/ticket/10605 in particular. Until these problems are fixed, please change your build; remove /etc/adjtime from /etc/rwtab, change the third line of /etc/adjtime to be UTC, copy the zoneinfo file for to /etc/localtime, install ntpdate, and write a script in /etc/NetworkManager/dispatcher.d/99-ntpdate #!/bin/sh if [ $2 = up ]; then ntpdate ${YOUR_NTP_SERVER} \ hwclock --systohc fi This will attempt to synchronise the time when the laptop connects to infrastructure wireless. (It can't be done at boot by /etc/init.d/ntpdate because there is no network connection then). You will also need to set timezone in Sugar, since it ignores /etc/localtime. Setting it in /etc/localtime is not enough. GNOME and text console timezone are correct. Choose an appropriate NTP server. pool.ntp.org might not be the best for a large population of school based laptops. Consider a longer timeout for ntpdate. The default may not be suitable for a class of laptops on a shared wet string. The above tested on os860. To read the RTC in OpenFirmware: ok select /rtc get-time decimal .s The values are least significant first. -- James Cameron http://quozl.linux.org.au/ ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [OLPC-AU] hwclock accuracy
On Thu, 2011-01-27 at 15:30 +1100, James Cameron wrote: On Wed, Jan 26, 2011 at 06:09:02PM -0600, Jerry Vonau wrote: That actually makes things worse, try installing ntpdate and run it with the stock /etc/adjtime file, now the real time clock is set to localtime as that is the first time hwclock is run. http://osdir.com/ml/fedora-olpc-list/2009-08/msg00102.html http://dev.laptop.org/ticket/9705 http://dev.laptop.org/ticket/10605 in particular. Until these problems are fixed, please change your build; remove /etc/adjtime from /etc/rwtab, change the third line of /etc/adjtime to be UTC, copy the zoneinfo file for to /etc/localtime, install ntpdate, and write a script in /etc/NetworkManager/dispatcher.d/99-ntpdate #!/bin/sh if [ $2 = up ]; then ntpdate ${YOUR_NTP_SERVER} \ hwclock --systohc fi This will attempt to synchronise the time when the laptop connects to infrastructure wireless. (It can't be done at boot by /etc/init.d/ntpdate because there is no network connection then). You will also need to set timezone in Sugar, since it ignores /etc/localtime. Setting it in /etc/localtime is not enough. GNOME and text console timezone are correct. https://dev.laptop.org.au/projects/xo-au/repository Well on the way, thanks for the heads up for /etc/rwtab Choose an appropriate NTP server. pool.ntp.org might not be the best for a large population of school based laptops. Consider a longer timeout for ntpdate. The default may not be suitable for a class of laptops on a shared wet string. The above tested on os860. To read the RTC in OpenFirmware: ok select /rtc get-time decimal .s The values are least significant first. Thanks again, Jerry ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel