sudo apt-get update && sudo apt-get install linuxptp
sudo vim /etc/linuxptp/gm-l2.conf
and add content:
[global]
serverOnly 1
time_stamping hardware
network_transport L2
delay_mechanism E2E
domainNumber 0
twoStepFlag 1
summary_interval 1
logAnnounceInterval 1
logSyncInterval 0
summary_interval 1
[eth0]
sudo vim /etc/systemd/system/[email protected]
Add content:
[Unit]
Description=linuxptp Grandmaster (ptp4l) on eth0
Wants=network-online.target
After=network-online.target sys-subsystem-net-devices-eth0.device
Requires=sys-subsystem-net-devices-eth0.device
[Service]
Type=simple
User=root
ExecStartPre=/sbin/ip link show dev eth0
ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp/gm-l2.conf -i eth0 -m
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
sudo vim /etc/systemd/system/phc2sys-gm-eth0.service
Content:
[Unit]
Description=phc2sys (CLOCK_REALTIME -> /dev/ptp0) on eth0
After=ptp4l-gm-eth0.service
Requires=ptp4l-gm-eth0.service
[Service]
Type=simple
User=root
ExecStart=/usr/sbin/phc2sys -s CLOCK_REALTIME -c /dev/ptp0 -O 0 -w -m
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now ptp4l-gm-eth0.service
sudo systemctl enable --now phc2sys-gm-eth0.service
journalctl -u ptp4l-gm-eth0 -n 50 -e | tail
journalctl -u phc2sys-gm-eth0 -n 50 -e | tail
Set Clock source to PTP and choose network transport "L2".

sudo adduser mandeye dialout


