"Fossies" - the Fresh Open Source Software Archive

Member "PPSkit-2.1.7/INSTALL" (29 Aug 2003, 4706 Bytes) of package /linux/misc/old/PPSkit-2.1.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 (Emacs: -*- indented-text -*-)
    2 
    3 		      Installation Instructions
    4 			    for PPSkit-2.0
    5 		      Copyright (c) 1997 - 2001
    6 			   by Ulrich Windl
    7 
    8 0) Unpack a compatible version of the Linux kernel sources (if not
    9    already done).  The kernel version should match the version of the
   10    patch (e.g. `patch-2.0.31pre9' matches `linux-2.0.31pre9').  Make
   11    sure that you have the tools and resources needed for a kernel
   12    compilation (see /usr/src/linux/Documentation/Changes).
   13 
   14    If you compiled a kernel before, you should do a `make mrproper' to
   15    clean up before patching.
   16 
   17 1) The patches against the kernel follow the usual convention, that is
   18    you need `-p1' if your are standing in your kernel directory.
   19    Apply the patch as usual (e.g. cd /usr/src/linux; patch -p1 <the_patch).
   20    If your patch program does produce a lot of output, maybe check for
   21    rejects using `find . -name '*.rej' -print'.  If your patch leaves
   22    backups of original files behind, you may want to execute
   23    `find . -name '*.orig' | xargs rm'.
   24 
   25 2a) Use `make config' and enable `experimental drivers' to see the PPS
   26     option.
   27 
   28 2b) Select `NTP kernel support', `NTP PPS support', and `NTP PPS
   29     support on serial port' after selecting the serial driver.  The
   30     driver can be inserted as a module at runtime if you like.
   31 
   32 3a) `make dep' and then make the kernel (and modules) as usual
   33     (e.g. `make bzImage')
   34 
   35 3b) OPTIONAL: Have a small break with coffee, tee, cookies, or whatever...
   36 
   37 4a) Activate the new kernel (copy the files and modules into place,
   38     maybe edit /etc/lilo.conf, and re-run LILO) and reboot (as
   39     usual)...
   40 
   41 4b) If you have built the serial driver as a module, load that module
   42     (`insmod serial.o' if it isn't done automatically) and be sure
   43     that the `PPSAPI' option is displayed (or logged).  The string
   44     should read similar to ``Serial driver version 5.05+ with
   45     PPS_API(RFC-2783) enabled''.
   46 
   47 4c) Make sure the right include files for the C compiler are found and
   48     used: The patch creates new files "timepps.h", and "timex.h" in
   49     ``$LINUX/include/linux'' (where ``$LINUX'' is your source directory.
   50     Despite of discussions whether files in /usr/include/sys should be the
   51     current kernel's versions, I simply state:
   52 
   53     If you intend to use ntpd with PPS support, you'll have to make a
   54     symbolic link for each of the files mentioned above.  Maybe you
   55     want to backup the original timex.h file.
   56 
   57     (e.g.	for i in timepps.h timex.h
   58 		do
   59 			ln -s $LINUX/include/linux/$i /usr/include/sys/$i
   60 		done
   61     )
   62 
   63     Remember to repeat this step whenever you upgrade your C library
   64     or include files (overwrite ``<sys/timex.h>'' to be specific).
   65 
   66 5) Do whatever you like ;-) If you use ntpd, be sure to get a recent
   67    version like ntp-4.0.99f (ntp-4.0.98b is the first release to
   68    support the draft "05" of the PPS API, hacked rather quickly using
   69    the FreeBSD implementation.  So be prepared for surprises and
   70    incompatibilities.)  You can set up the PPS API using ``ppsctl'' if
   71    the daemon fails to do so. Just make sure the port remains opened).
   72 
   73    [The details of PPS/ATOM configuration and monitoring are described
   74    in the NTP FAQ]
   75 
   76    For ntpd-4.0.98a the ATOM driver worked out-of-the-box.  But you'll
   77    have to remove config.cache, do re-configure, and recompile ntpd to
   78    get PPS support into the daemon.  You should configure the ATOM
   79    reference clock in addition to your usual clocks.
   80 
   81    You must recompile ntpd 4.0 to work correctly with the new kernel.
   82    Binaries compiled with the standard kernel will show strange effects
   83    (see the NTP FAQ for details).  Recent versions seem to have some
   84    limited auto-detection capabilities however, so they might even work.
   85 
   86    When everything is working, the ``ATOM'' (``PPS'') clock will become
   87    ``PPS peer'' (`o') after some time if the preferred peer has been chosen
   88    as primary synchronization source, and the PPS signal has been monitored
   89    to be good enough.
   90 
   91    With ntpd-4.0 the flag ``STA_PPSFREQ'' should go on once the
   92    preferred time source is reachable and seems valid.  If the jitter
   93    is low enough, or if the offset is small enough, ``STA_PPSTIME''
   94    will also go on.
   95 
   96    Maybe after a while your loopstats file will look like this:
   97 51791 75053.799 0.000000609 16.613007 0.000013035 0.009817 6
   98 51791 75119.800 -0.000000286 16.614990 0.000011292 0.008559 6
   99 51791 75185.801 0.000000192 16.614990 0.000009781 0.007413 6
  100 51791 75249.802 -0.000000460 16.613998 0.000008473 0.006439 6
  101 51791 75313.804 0.000000138 16.613998 0.000007342 0.005576 6
  102 51791 75379.805 0.000000020 16.608047 0.000006371 0.005672 6
  103 51791 75443.806 -0.000000158 16.608047 0.000005532 0.004912 6