[LinuxPPS] Patches for kernel 2.6.26-rc8

Bernhard Schiffner bernhard at schiffner-limbach.de
Sun Jul 6 18:39:24 CEST 2008


On Sunday 06 July 2008 18:03:36 Hal V. Engel wrote:
> On Sunday 06 July 2008 08:52:54 am Hal V. Engel wrote:
> > On Sunday 06 July 2008 07:14:15 am Bernhard Schiffner wrote:
> > > On Sunday 06 July 2008 10:31:38 Hal V. Engel wrote:
> > > ...
> > >
> > > > Second ntp appears to be running in microsecond mode rather than
> > > > nanosecond mode even though I built it against the new kernel header
> > > > files.  When I run ntptime I get:
> > > >
> > > >
> > > > ntp_gettime() returns code 0 (OK)
> > > >   time cc1a25a4.f3dc6000  Sat, Jul  5 2008  9:53:56.952, (.952581),
> > > Ther are (small but important) differerences between /usr/include/linux
> > > and /usr/src/kernel/include/linux.
> > > One is what the distributor cleaned up for your use, working with a lot
> > > of different kernels too. The other is the recent opinion of the
> > > kernel-community.
> > > Test this please to get it right.
> >
> > What should I test?  Are you saying that I should build ntp without the
> > symlinked directories?  I will give that a try.

Perhaps I said it the wrong way.

To make a ntpd working with ns-resolution (your primary concern) you need a 
ntpd compiled with _consideration_ of the kernel variable STA_NANO.
(STA_NANO will come with linux 2.6.26. Make sure it is set in your environment 
accordingly.)

If have to do the ntpd compilation yourself, make sure to reach the same 
status as mentioned above.

> This did not work.  If I build ntp without the symlinked directories in
> /usr/include it will not work with the PPS device.

Wrong :-(
Sometimes it is important to have access to the latest and greatest 
kernel-defines.
You'll find them under ($KERNELSOURCE)/include/linux/.
Your distributor usually makes a "strange" copy of this directory and provides 
it as /usr/include/linux.
Diff these two directories to see their differences. Find your opinion about 
this. (Is STA_NANO accesssible?)

One simple way to get rid of the differences is to move /usr/include/linux to 
an other place for later restore, delete /usr/include/linux and create a 
symlink instead (ln -s  ($KERNELSOURCE)/include/linux  /usr/src/linux).

Don't delete symlinks in /usr/include ...

I hope this explanation helps.
(Perhaps I find some time to come into this business myself again.)

Bernhard



More information about the LinuxPPS mailing list