1588 Testing
ptp4l implements the PTP boundary clock and ordinary clock. When hardware time stamping is enabled, ptp4l synchronizes the PTP hardware clock to the master clock. phc2sys can be used to synchronize the system clock to the PTP hardware clock on the network interface card (NIC).
Build Instructions for ptp4l application
- Get the source
git clone http://git.code.sf.net/p/linuxptp/code linuxptp
- Set the CROSS_COMPILE environment variable arm toolchain
- Install the kernel headers
https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt
- Include the headers path in makefile
INC = -I/proj/epdsw/punnaiah/git/test/ethernet/1588/header/include CFLAGS = -Wall $(VER) $(incdefs) $(DEBUG) $(INC) $(EXTRA_CFLAGS)
- run make
Execution steps
In order to perform master-slave sync, run the following:
Master (linux server) : ptp4l -i < interface name> -m Slave (xilinx board) : ptp4l -i <interface name> -m -s
NOTE : If intended before synchronization phc2sys -s <devicename> -w & can be run to synchronize the system clock to a PTP hardware clock.
Synchronization is stabilized in a few secs.