[LinuxPPS] running 2.6.26 just fine, but what about nano?
Hal V. Engel
hvengel at astound.net
Mon Jul 14 21:31:32 CEST 2008
On Monday 14 July 2008 11:20:43 am Remco den Besten wrote:
> Hello Hal,
>
> I saw your thread concerning STA_NANO. However, it is a little too far from
> my bed. Having it running now with the latest LinuxPPS-version (perhaps in
> a 'Scooby Doo'-manner ;-) was a discovery tour between all of you 'kernel
> hackers'.
I am not really a kernel hacker but I have on occation run hand modified
kernels. But this is something I try to avoid.
>
> Is it possible to publish a kind of cookbook recipe to include nano, e.g.
> assuming that the (header) files linux, asm, asm-generic and timepps.h from
> rc8 are in the appropriate position?
I don't know. I know in my case that I had some header files in distro
specific locations that had to be hand modified to get ntp to build with nano
support. In my case this appeared to be x86_64 (arch) related since it used
different timex.h headers for x86_64 and x86 builds. I suspect that for some
distros (at least for some arches) following the documented procedure on the
wiki would work but I don't have any idea if this would be a common or rare
occurance.
>
> What do I have to tell ntp(-dev) to include nano or have to edit in the
> ntpd-source files to get nano running?
If it is picking up the correct headers then you will not have to do anything.
The header where this stuff (STA_NANO and friends) is defined is timex.h. The
problem is that timex.h exists in several different places (the ntp tree and
the kernel tree and perhaps others) and you need to make sure that the build
is picking up a version that contains the define for STA_NANO and some other
related defines.
It was not easy to track down which versions of this header file were actually
being included during the ntp build and when looking at the various include
directories on my system there were numerous timex.h files. I found that by
greping the build for timex.h (IE. make | grep timex.h) I was able to isolate
where the build was finding it and I was able to modify the version being used
by the build. This was a very ugly hack which you should avoid if at all
possible.
I suspect that once 2.6.26 becomes a standard package for your distro (as well
as mine) that the distro's package manager will handle making sure that the
right headers are available and then ntp should build correctly without having
to do anything. But it will likely be a few weeks or perhaps even months
before that happens for many of us.
Sorry I can't give you a better answer but at least for my system this
appeared to be highly distro dependant with the current code base. As a
result I don't think a general cookbook approach is possible right now since
there are too many unknowns. It might be possible to write a distro and arch
specific recipe but that would only be useful to a very limited number of
people and may actually cause a significant problems for other users if they
should happen to try it. In addition it is fairly likely that this will all
change again soon making the recipe obsolete.
So the best advice I can give is to use
make | grep timex.h
to make sure the ntp build is picking up the right version of this file (IE.
one with #define STA_NANO). If not the you need to figure out what needs to
be done to get it to work.
>
> Yours willing to experiment (by trial and error ;-),
>
> Remco
>
> > Dunno. Isn't it an `always` on kinda thing?
> >
> > With the ntpd compiltion process finding the kernel headers etc?
>
> I ran into this with rc8. Yes it does appear to be an always thing and
> ntp will be setup for NANO if it finds STA_NANO is defined and some other
> related defines are set. But you do have to make sure that the headers that
> ntp is picking up have these things correctly defined and this may vary
> depending on your distro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20080714/819ce77b/attachment-0001.htm
More information about the LinuxPPS
mailing list