[LinuxPPS] PPS on a recent kernel

William S. Brasher billb958 at door.net
Sun Oct 18 12:08:59 CEST 2009


On Sun, 18 Oct 2009, Udo van den Heuvel wrote:

> On 2009-10-17 20:48, Shane W wrote:
> > Just trying to get PPS going on a 2.6.31/32rc kernel and am
> > having some trouble. The PPS patches on the ftp site are
> > for 2.6.28 and gitweb appears broken. That is, according to
> > gitweb, it was last changed in February and I can't do a
> > clone.
> > 
> > $ git clone git://git.enneenne.com/linuxpps linuxpps
> > Initialized empty Git repository in /home/shane/kernel/git/linuxpps/.git/
> > git.enneenne.com[0: 81.174.11.161]: errno=Connection refused
> > fatal: unable to connect a socket (Connection refused)
> > 
> > And yet, it appears bits of PPS were merged to mainline so
> > it must still be maintained. Just wondering what I need to
> > do. I am working from the documentation on the PPS wiki.
> 
> As far as I know:
> The code for 2.6.31 is not yet complete. Please use 2.6.30 as latest.
> 
> Udo
> 
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
> 
> 



I am using LinuxPPS with linux-2.6.31 with no perceived problems, even 
though this is very much a work in progress.

Linux-2.6.31 was patched with 9 patches Rodolfo Giometti sent to
the LinuxPPS mailing list Wednesday, September 16 2009, and may
be found in the archives with the following subject headings:

 [LinuxPPS] [PATCH 01/11] pps: userland header file for PPS API.
 [LinuxPPS] [PATCH 02/11] pps: documentation programs and examples.
 [LinuxPPS] [PATCH 03/11] pps: LinuxPPS clients support.
 [LinuxPPS] [PATCH 04/11] ldisc: new dcd_change() method for line disciplines.
 [LinuxPPS] [PATCH 05/11] ldisc n_tty: export all N_TTY ldisc methods.
 [LinuxPPS] [PATCH 06/11] pps: serial clients support.
 [LinuxPPS] [PATCH 07/11] serial 8250: enable PPS support.
 [LinuxPPS] [PATCH 08/11] pps: parallel port clients support.
 [LinuxPPS] [PATCH 09/11] pps: low level IRQ timestamps recording.


I use ntp-4.2.4p7 patched with the nmea patch found on
http://wiki.enneenne.com/index.php/LinuxPPS_NTPD_support

http://ftp.enneenne.com/pub/misc/linuxpps/refclocks/nmea/nmea.patch


I configure NTP as follows:
 LDFLAGS=-lrt ./configure --prefix=/usr --bindir=/usr/sbin \
    --sysconfdir=/etc --with-binsubdir=sbin \
    --enable-shared  --with-crypto

Since the routines clock_gettime and clock_settime are in librt, I add the 
LDFLAGS so configure can find them.



I am using glibc-2.10.1 with linux headers taken from linux-2.6.30 that 
was patched with an earlier version of LinusPPS.  The following patch must 
be applied to ntp-4.2.4p7 in addition to the nmea.patch above inorder to 
get ntp to compile with this glibc:


diff -Naur ntp-4.2.4p7.org/include/ntp_syscall.h ntp-4.2.4p7/include/ntp_syscall.h
--- ntp-4.2.4p7.org/include/ntp_syscall.h       2004-02-24 23:57:56.000000000 -0600
+++ ntp-4.2.4p7/include/ntp_syscall.h   2009-06-14 13:09:26.000000000 -0500
@@ -14,6 +14,14 @@
 # include <sys/timex.h>
 #endif
 
+#if defined(ADJ_NANO) && !defined(MOD_NANO)
+#define MOD_NANO ADJ_NANO
+#endif
+
+#if defined(ADJ_TAI) && !defined(MOD_TAI)
+#define MOD_TAI ADJ_TAI
+#endif
+
 #ifndef NTP_SYSCALLS_LIBC
 #ifdef NTP_SYSCALLS_STD
 # define ntp_adjtime(t)                syscall(SYS_ntp_adjtime, (t))




More information about the LinuxPPS mailing list