view · edit · print · history

The NSLU2 has a hardware Real Time Clock (RTC), however while Linux is running, time is actually kept using interrupts from the built in XScale clock registers (i.e. the RTC is not used).

The mainstream versions of the Linux kernel assume that IXP4XX boards provide a clock input to the CPU which causes clock counts to happen at a rate of 66.666666MHz. Unfortunately this would require a 33.333333MHz crystal and no one seems to sell those...

In practice, therefore, an IXP4XX board has some built in clock drift which can be determined from the actual clock frequency. On the NSLU2 board the crystal is 33MHz and the clock count rate is 66MHz, other IXP4XX boards use 33.33MHz or 33.3333MHz crystals which are much closer to the Linux expected value. The Intel specified value is actually 33.33MHz (though the documentation may not be consistent.)

OpenSlug kernels correct for the actual clock frequency in a variety of ways (depending on the kernel). In addition NTP software (ntp or openntp) will automatically correct the clock from external time server sources.

NTP (but not openntp) writes a file /etc/ntp.drift which is the clock error in parts per million (PPM). Over time (at least 24 hours) this value will give the actual accuracy of the crystal on the specific board. By collecting values from different boards we can work out how reproducible the crystals are.

In is my [jbowler's] idea that all NSLU2 boards show approximately the same drift and that some internal inaccuracy in the OpenSlug software is causing a small (about 10ppm) drift. If this can be established as a consistent error we can improve clock accuracy on the NSLU2 in the absence of NTP.

Therefore if you install NTP on openslug (or variants) and run it for long enough (at least 24 hours) to both produce /etc/ntp.drift and get a consistent value please enter the value below:

NSLU2 clock drift samples
DriftOS Versionuptimename
9.872OpenSlug 2.74 daysJohn Bowler, cuillin
6.818OpenSlug 3.02 daysJohn Bowler, lochalsh
20.145OpenSlug 2.740 daysBirko Bergt, slugracer
7.293OpenSlug 2.7 Jochen Rüter
-26.371OpenSlug 2.735Brian Wood, OpenSlug
20.107OpenDebianSlug Brian Wood, OpenDebianSlug
9.715Unslung 5.5 Beta5 daysChris Burghart, chris_burghart
48.680OpenSlug 2.5113 daysRoger Nilsson
15.123OpenSlug 2.726 dayspTweety
10.727OpenSlug 2.7 Adrian Day
7.49OpenSlug 2.7189 daysTim Auton
10.269OpenSlug 3.101 day 7hBernard Davison
-0.528Debian 2.6.18.dfsg.1-10 / Etch rc120 daysmas
11.187OpenSlug 3.10216 daysThomann
view · edit · print · history · Last edited by fcarolo.
Based on work by Thomann, mas, Bernard Davison, Tim Auton, Peter Taylor, jbowler, beww, pTweety, Chris Burghart, Birko Bergt, and nilrog.
Originally by jbowler.
Page last modified on August 12, 2007, at 07:23 PM