--------------------------------------------------------------------------------
File    : README
Date    : 10/07/10
Purpose : Defines instructions for incorporating the TSYNC NTP reference
          clock driver into the NTPv4 daemon.

Note    : "tsync.patch" and this procedure were updated for changes made
          in "NTP revision ntp-4.2.6p2".

--------------------------------------------------------------------------------

Directions:
----------

1. Retrieve the lastest NTPv4 source and place in desired directory along
   with refclock_tsyncpci.c and tsync.patch.

2. Untar source tar ball
    > tar -xvf ntp-4.2.4p6.tar.gz

3. Change directory into newly created NTP directory
    > cd ntp-4.2.4p6

4. Copy 'refclock_tpropci.c' file into ntp-4.2.4p6/ntpd
    > cp ../refclock_tsyncpci.c ntpd/refclock_tsyncpci.c

5. Copy 'tsync.patch' file in newly created NTP directory
    > cp ../tsync.patch tsync.patch

6. Apply patch to the NTP source
    > patch -Np1 -i tsync.patch

7. Auto reconfigure the NTP configuration
    > autoreconf

8. Run NTP configure script. (You may require additional configure directives)
    > ./configure --enable-all-clocks

9. Make the NTP daemon
    > make

10. Install the newly compiled NTP daemon
    > make install

11. Configure the NTP daemon to use the TSYNC reference clock driver by editting
    the ntp.conf file. The default location for ntp.conf is "/etc/ntp.conf".

Example ntp.conf:
--------------------------------------------------------------------------------
restrict 127.0.0.1
restrict -4 default
restrict -6 default
server 127.127.45.0 prefer  # Use TSYNC device 0 as the preferred server
server 127.127.45.1         # Use TSYNC device 1 as additional server
driftfile /etc/ntp.drift
logfile /var/ntp.log
--------------------------------------------------------------------------------


