(Emacs: -*- indented-text -*-)

		      Installation Instructions
			    for PPSkit-0.6
		    Copyright (c) 1997, 1998, 1999
			   by Ulrich Windl

0) Unpack a compatible version of the Linux kernel sources (if not
   already done).  The kernel version should match the version of the
   patch (e.g. `patch-2.0.31pre9' matches `linux-2.0.31pre9').  Make
   sure that you have the tools and resources needed for a kernel
   compilation (see /usr/src/linux/Documentation/Changes)

1) The patches against the kernel follow the usual convention, that is
   you need `-p1' if your are standing in your kernel directory.
   Apply the patch as usual (e.g. cd /usr/src/linux; patch -p1
   <the_patch).

   If you intend to use xntpd with PPS support, you'll have to make a
   symbolic link (``ln -s ../linux/ppsclock.h /usr/include/sys/ppsclock.h''),
   because I did not want to patch `/usr/include/sys'...

2a) `make config' and enable `experimental drivers' if you want to try
    PPS support on the serial port.  Other fixes are active anyway.

2b) Select `NTP kernel support', `NTP PPS support', and `NTP PPS
    support on serial port' after selecting the serial driver.  The
    driver can be inserted as a module at runtime if you like.

3a) `make dep' and then make the kernel as usual (e.g. `make bzImage')

3b) OPTIONAL: Have a small break with coffee, tee, cookies, or whatever...

4a) Activate the new kernel (copy the files into place, maybe edit
    /etc/lilo.conf, and re-run LILO) and reboot (as usual)...

4b) If you have built the serial driver as a module, load that module
    (`insmod serial.o' if it isn't done automatically) and be sure
    that the `PPS' option is displayed (or logged).  The string should
    read similar to ``Serial driver version 4.27+ with PPS enabled''.

5) Do whatever you like ;-) If you use xntpd, be sure to get a recent
   version like xntp3-5.93.  I'm not yet convinced about the quality
   of ntp4.0.  The patch won't automatically create a symbolic link
   from <sys/ppsclock.h> to <linux/ppsclock.h>; do that manually (cd
   /usr/include && ln -s linux/ppsclock.h sys/ppsclock.h).  There is a
   patch for xntpd included to get the ATOM driver working (at least I
   tested it for clocks using the PARSE driver).  You'll also have to
   remove config.cache, do re-configure, and recompile xntpd to get
   PPS support into the daemon.  You should have configured ATOM and
   LOCAL reference clocks in addition to your usual clocks.

   It seems you must recompile ntpd 4.0 to make it use ``STA_NANO''.
   In any case it's highly recommended, as some bit definitions for
   ``adjtimex()'' had to be changed for nanokernel support.

   An unpatched version of xntpd will detect support for `CIOGETEV' and
   use it for `ATOM' (which becomes a peer (`+') after some time).

   With the patch the `ATOM' will become ``PPS peer'' (`o') after some
   time if the preferred peer has been chosen as primary
   synchronization source, and the PPS signal has been monitored to be
   good enough.  You can force the PPS signal to be valid by using
   ``enable pps'' either in your configuration file, or at runtime
   using xntpdc.  I could only test it with PARSE drivers though.
