nxp-archive / openil

OpenIL is an open source project based on Buildroot and designed for embedded industrial solution.
Other
136 stars 55 forks source link

Query about phc2sys #61

Closed diegotxegp closed 4 years ago

diegotxegp commented 4 years ago

Hi there,

After synchronising my network (slave-master-slave) with IEEE 802.1AS gPTP, acting my LS1021ATSN platform as master. My question is: What phc2sys instructions should I use on the slaves?

I tried to use this: sudo phc2sys -a -rr -m

But a message appears saying: "waiting for ptp4l". But ptp4l is already working.

Another command I tried was: sudo phc2sys -c /ptp/ptp0 -s CLOCK_REALTIME -O 0 -m With this command, the node tries to synchronise CLOCK_REALTIME to its PHC but it appears an offset high.

My question is: What instruction for phc2sys do you recommend me? And another question is: Must I run phc2sys also in the master?

Thank you very much for reading me.

Kind regards, Diego

vladimiroltean commented 4 years ago

Did you notice the phc2sys systemctl service that comes preinstalled?

[root@LS1021ATSN ~] # systemctl status phc2sys.service 
● phc2sys.service - Precision Time Protocol system clock synchronization
     Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-06-18 10:40:42 UTC; 6h ago
   Main PID: 824 (phc2sys)
      Tasks: 1 (limit: 2047)
     Memory: 408.0K
     CGroup: /system.slice/phc2sys.service
             └─824 /usr/sbin/phc2sys -a -rr -f /etc/linuxptp-system-clock.cfg

Jun 18 17:32:59 LS1021ATSN phc2sys[824]: [77650.736] swp5 sys offset     -1923 s2 freq  -22809 delay 161679
Jun 18 17:33:00 LS1021ATSN phc2sys[824]: [77651.737] swp5 sys offset        72 s2 freq  -21391 delay 163039

Inside /etc/linuxptp-system-clock.cfg you will find:

transportSpecific       0x1

which is needed if ptp4l is operating in 802.1AS mode, otherwise ptp4l and phc2sys will not be able to communicate through the UNIX domain socket.

vladimiroltean commented 4 years ago

And another question is: Must I run phc2sys also in the master?

If you are using the LS1021A-TSN board as a master, you need to hook it up to a valid time reference. On the board itself there is not even a battery-backed RTC, so after each boot, the system time will start from Jan 1st 1970. So, something like GPS, NTP, etc. But nonetheless, phc2sys is happy to provide CLOCK_REALTIME into the PTP domain, and it is configured to do that by default (-rr).

diegotxegp commented 4 years ago

Did you notice the phc2sys systemctl service that comes preinstalled?

[root@LS1021ATSN ~] # systemctl status phc2sys.service 
● phc2sys.service - Precision Time Protocol system clock synchronization
     Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-06-18 10:40:42 UTC; 6h ago
   Main PID: 824 (phc2sys)
      Tasks: 1 (limit: 2047)
     Memory: 408.0K
     CGroup: /system.slice/phc2sys.service
             └─824 /usr/sbin/phc2sys -a -rr -f /etc/linuxptp-system-clock.cfg

Jun 18 17:32:59 LS1021ATSN phc2sys[824]: [77650.736] swp5 sys offset     -1923 s2 freq  -22809 delay 161679
Jun 18 17:33:00 LS1021ATSN phc2sys[824]: [77651.737] swp5 sys offset        72 s2 freq  -21391 delay 163039

Inside /etc/linuxptp-system-clock.cfg you will find:

transportSpecific       0x1

which is needed if ptp4l is operating in 802.1AS mode, otherwise ptp4l and phc2sys will not be able to communicate through the UNIX domain socket.

I get this result when I write "systemctl status phc2sys.service":

[root@LS1021ATSN ~] # systemctl status phc2sys.service ● phc2sys.service - Precision Time Protocol system clock synchronization Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; disabled; vendor preset: enabled) Active: inactive (dead)

And inside "/etc/linuxptp-system-clock.cfg", yes, I have "transportSpecific 0x1". [root@LS1021ATSN /etc] # cat linuxptp-system-clock.cfg

Configuration file for phc2sys

[global] step_threshold 0.00002 first_step_threshold 0.00002 transportSpecific 0x1

diegotxegp commented 4 years ago

And another question is: Must I run phc2sys also in the master?

If you are using the LS1021A-TSN board as a master, you need to hook it up to a valid time reference. On the board itself there is not even a battery-backed RTC, so after each boot, the system time will start from Jan 1st 1970. So, something like GPS, NTP, etc. But nonetheless, phc2sys is happy to provide CLOCK_REALTIME into the PTP domain, and it is configured to do that by default (-rr).

I do not need a current time. I do not mind if it is 1970. What I want is simply that time from LS1021ATSN is synchronised in the slaves.

So, with you answer, I understand that there is no problem to keep the time in 1970 every time I reboot the LS1021ATSN platform. In general, the network will work perfectly synchronised, regardless if it is a current time.

diegotxegp commented 4 years ago

I tried to enable phc2sys with "systemctl enable phc2sys --now" but it does not work.

vladimiroltean commented 4 years ago

but it does not work

Helpful. How does it not work? What does journalctl -b -u phc2sys -f show?

diegotxegp commented 4 years ago

Sorry Vladimir.

Executing "journalctl -b -u phc2sys -f" at the LS1021ATSN platform I get this result:

[root@LS1021ATSN ~] # journalctl -b -u phc2sys -f -- Logs begin at Fri 2020-02-07 21:55:08 UTC. -- Feb 08 00:45:40 LS1021ATSN phc2sys[507]: [32090.164] swp5 sys offset 160 s2 freq -20537 delay 166640 Feb 08 00:45:41 LS1021ATSN phc2sys[507]: [32091.165] swp5 sys offset -672 s2 freq -21321 delay 169760 Feb 08 00:45:42 LS1021ATSN phc2sys[507]: [32092.166] swp5 sys offset 664 s2 freq -20187 delay 166160 Feb 08 00:45:43 LS1021ATSN phc2sys[507]: [32093.168] swp5 sys offset -640 s2 freq -21291 delay 167760 Feb 08 00:45:44 LS1021ATSN phc2sys[507]: [32094.169] swp5 sys offset 1128 s2 freq -19715 delay 165040 Feb 08 00:45:45 LS1021ATSN phc2sys[507]: [32095.171] swp5 sys offset -800 s2 freq -21305 delay 167200 Feb 08 00:45:46 LS1021ATSN phc2sys[507]: [32096.172] swp5 sys offset 224 s2 freq -20521 delay 167280 Feb 08 00:45:47 LS1021ATSN phc2sys[507]: [32097.173] swp5 sys offset -584 s2 freq -21262 delay 167040 Feb 08 00:45:48 LS1021ATSN phc2sys[507]: [32098.175] swp5 sys offset -1096 s2 freq -21949 delay 169280 Feb 08 00:45:49 LS1021ATSN phc2sys[507]: [32099.176] swp5 sys offset -1352 s2 freq -22534 delay 172080 Feb 08 00:45:50 LS1021ATSN phc2sys[507]: [32100.178] swp5 sys offset 3800 s2 freq -17787 delay 165280 Feb 08 00:45:51 LS1021ATSN phc2sys[507]: [32101.179] swp5 sys offset 640 s2 freq -19807 delay 165280 Feb 08 00:45:52 LS1021ATSN phc2sys[507]: [32102.181] swp5 sys offset -1808 s2 freq -22063 delay 167520

But if I run it on one of the nodes, it does not show anything. As I said to you, when I type "sudo phc2sys -a -rr", a message with "Waiting for ptp4l..." appears.

What I want it synchronise my Linux system time to the PHC of the nodes. Once, ptp4l has synchronise all the PHC of the domain to the Grandmaster, I want to transfer that time to the Linux system time. As I said to you, I do not mind that that time is in 1970. Neither I have a GPS as a reference clock.

Thank you very much for your help and your quick response.

Diego

vladimiroltean commented 4 years ago

Executing "journalctl -b -u phc2sys -f" at the LS1021ATSN platform I get this result:

So, it works. Quite a big difference. Now, granted, the offsets aren't the best and I'll need to look into why the kernel headers aren't picked up properly (again), but nonetheless, the procedure is correct and what should happen happens.

But if I run it on one of the nodes, it does not show anything. As I said to you, when I type "sudo phc2sys -a -rr", a message with "Waiting for ptp4l..." appears.

I'm forced to repeat myself:

Inside /etc/linuxptp-system-clock.cfg you will find:

transportSpecific 0x1

which is needed if ptp4l is operating in 802.1AS mode, otherwise ptp4l and phc2sys will not be able to communicate through the UNIX domain socket.

If we take what I said and apply it to the situation at hand, it would read like this: "Since you are using the linuxptp stack not only on the LS1021A-TSN but also on your other nodes, everything protocol-related which stands true for the LS1021A-TSN also stands true for your other nodes. So, if you are using the gPTP.cfg profile on another node, then you should also use phc2sys with the --transportSpecific 1 option on that node, if you want to involve the CLOCK_REALTIME in clock synchronization. Like this: phc2sys -a -rr --transportSpecific 0x1".

diegotxegp commented 4 years ago

Following your comments, I got these results on my nodes:

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m [sudo] password for nodo2: phc2sys[1797.065]: reconfiguring after port state change phc2sys[1797.067]: selecting CLOCK_REALTIME for synchronization phc2sys[1797.067]: selecting enp3s0 as the master clock phc2sys[1797.068]: CLOCK_REALTIME phc offset 1592814778765002635 s0 freq +0 delay 5388 phc2sys[1798.068]: failed to step clock: Invalid argument phc2sys[1798.069]: CLOCK_REALTIME phc offset 1592814778765013231 s1 freq +10589 delay 5616 phc2sys[1799.069]: CLOCK_REALTIME phc offset 1592814778765013304 s2 freq +100000000 delay 5364 phc2sys[1800.070]: CLOCK_REALTIME phc offset 1592814778654804391 s2 freq +100000000 delay 5033 phc2sys[1801.070]: CLOCK_REALTIME phc offset 1592814778543662571 s2 freq +100000000 delay 5043 phc2sys[1802.070]: CLOCK_REALTIME phc offset 1592814778432524145 s2 freq +100000000 delay 4849 phc2sys[1803.071]: CLOCK_REALTIME phc offset 1592814778321390847 s2 freq +100000000 delay 5043 phc2sys[1804.071]: CLOCK_REALTIME phc offset 1592814778210259226 s2 freq +100000000 delay 5043 phc2sys[1805.071]: CLOCK_REALTIME phc offset 1592814778099125324 s2 freq +100000000 delay 5044 phc2sys[1806.072]: CLOCK_REALTIME phc offset 1592814777987992639 s2 freq +100000000 delay 4742 phc2sys[1807.072]: CLOCK_REALTIME phc offset 1592814777876858160 s2 freq +100000000 delay 5033 phc2sys[1808.072]: CLOCK_REALTIME phc offset 1592814777765722789 s2 freq +100000000 delay 5022

I am not sure it works properly because of two reasons; it appears this message "phc2sys[1798.068]: failed to step clock: Invalid argument" and, as you can see, offset is quite big.

How could I solve it? Thank you

Diego

vladimiroltean commented 4 years ago

Here is where having a CLOCK_REALTIME in 1970 might become a bit of a problem. Does it work if you manually configure your master in 2020?

phc_ctl CLOCK_REALTIME set 1592817646.744752137
diegotxegp commented 4 years ago

After the previous results I sent you, I paused the "sudo phc2sys -a -rr --transportSpecific 0x1 -m" and got these different results:

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m [sudo] password for nodo2: phc2sys[4334.473]: reconfiguring after port state change phc2sys[4334.475]: selecting CLOCK_REALTIME for synchronization phc2sys[4334.475]: selecting enp3s0 as the master clock phc2sys[4334.477]: CLOCK_REALTIME phc offset 1592814497082320705 s0 freq +100000000 delay 4741 phc2sys[4335.478]: CLOCK_REALTIME phc offset 1592814496970978619 s1 freq +9561 delay 5032 phc2sys[4336.478]: CLOCK_REALTIME phc offset -599364 s2 freq -589803 delay 5592 phc2sys[4337.479]: CLOCK_REALTIME phc offset -2200 s2 freq -172448 delay 5344 phc2sys[4338.479]: CLOCK_REALTIME phc offset 181478 s2 freq +10570 delay 5605 phc2sys[4339.479]: CLOCK_REALTIME phc offset 180911 s2 freq +64446 delay 5340 phc2sys[4340.480]: CLOCK_REALTIME phc offset 125944 s2 freq +63753 delay 5376 phc2sys[4341.480]: CLOCK_REALTIME phc offset 71483 s2 freq +47075 delay 5616 phc2sys[4342.481]: CLOCK_REALTIME phc offset 33688 s2 freq +30725 delay 5376 phc2sys[4343.481]: CLOCK_REALTIME phc offset 12392 s2 freq +19535 delay 5604 phc2sys[4344.481]: CLOCK_REALTIME phc offset 2256 s2 freq +13117 delay 5628 phc2sys[4345.482]: CLOCK_REALTIME phc offset -1487 s2 freq +10050 delay 5604 phc2sys[4346.482]: CLOCK_REALTIME phc offset -2049 s2 freq +9042 delay 5364 phc2sys[4347.482]: CLOCK_REALTIME phc offset -1617 s2 freq +8860 delay 5616 phc2sys[4348.483]: CLOCK_REALTIME phc offset -986 s2 freq +9006 delay 5579 phc2sys[4349.483]: CLOCK_REALTIME phc offset -598 s2 freq +9098 delay 5592 phc2sys[4350.484]: CLOCK_REALTIME phc offset -200 s2 freq +9316 delay 5604 phc2sys[4351.484]: CLOCK_REALTIME phc offset -48 s2 freq +9408 delay 5376 phc2sys[4352.484]: CLOCK_REALTIME phc offset -78 s2 freq +9364 delay 5556 phc2sys[4353.485]: CLOCK_REALTIME phc offset 60 s2 freq +9479 delay 5604 phc2sys[4354.485]: CLOCK_REALTIME phc offset -1 s2 freq +9436 delay 5604 phc2sys[4355.486]: CLOCK_REALTIME phc offset -106 s2 freq +9330 delay 5220 phc2sys[4356.486]: CLOCK_REALTIME phc offset 68 s2 freq +9472 delay 5364 phc2sys[4357.486]: CLOCK_REALTIME phc offset 27 s2 freq +9452 delay 5628 phc2sys[4358.487]: CLOCK_REALTIME phc offset -38 s2 freq +9395 delay 5604 phc2sys[4359.487]: CLOCK_REALTIME phc offset -100 s2 freq +9322 delay 5603 phc2sys[4360.488]: CLOCK_REALTIME phc offset 59 s2 freq +9451 delay 5616 phc2sys[4361.488]: CLOCK_REALTIME phc offset 49 s2 freq +9458 delay 5604 phc2sys[4362.488]: CLOCK_REALTIME phc offset -59 s2 freq +9365 delay 5604 phc2sys[4363.489]: CLOCK_REALTIME phc offset 117 s2 freq +9523 delay 5604 phc2sys[4364.489]: CLOCK_REALTIME phc offset 97 s2 freq +9538 delay 5580 phc2sys[4365.490]: CLOCK_REALTIME phc offset -25 s2 freq +9445 delay 5376 phc2sys[4366.490]: CLOCK_REALTIME phc offset -88 s2 freq +9375 delay 5580 phc2sys[4367.491]: CLOCK_REALTIME phc offset -145 s2 freq +9292 delay 5604 phc2sys[4368.491]: CLOCK_REALTIME phc offset 11 s2 freq +9404 delay 5592 phc2sys[4369.491]: CLOCK_REALTIME phc offset -52 s2 freq +9344 delay 5604 phc2sys[4370.492]: CLOCK_REALTIME phc offset 150 s2 freq +9531 delay 5580 phc2sys[4371.492]: CLOCK_REALTIME phc offset 0 s2 freq +9426 delay 5352 phc2sys[4372.493]: CLOCK_REALTIME phc offset -32 s2 freq +9394 delay 5592

Much smaller. Not touching anything. Just I stopped and run it again. I noticed that Linux system time (the clock as you see on your desktop) changed and the date changed to 1970. That is why I asked you why the previous results were so big, if I knew that the node clock must to synchronise to master and then take the exact time as the master.

Using ptp4l and phc2sys for IEEE 1588 I got really small offset such as -15,15 ns for ptp4l on the nodes and similar on the nodes for phc2sys.

Changing the master time to 2020, I got these results running phc2sys on my node, but this time, the Linux system time is kept in 1970.

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m phc2sys[4900.297]: reconfiguring after port state change phc2sys[4900.300]: selecting CLOCK_REALTIME for synchronization phc2sys[4900.300]: selecting enp3s0 as the master clock phc2sys[4900.300]: CLOCK_REALTIME phc offset -59024 s0 freq +9441 delay 5364 phc2sys[4901.301]: CLOCK_REALTIME phc offset -59156 s1 freq +9309 delay 5639 phc2sys[4902.301]: CLOCK_REALTIME phc offset 174 s2 freq +9483 delay 5640 phc2sys[4903.301]: CLOCK_REALTIME phc offset 133 s2 freq +9494 delay 5592 phc2sys[4904.302]: CLOCK_REALTIME phc offset 108 s2 freq +9509 delay 5580 phc2sys[4905.302]: CLOCK_REALTIME phc offset 47 s2 freq +9481 delay 5604 phc2sys[4906.303]: CLOCK_REALTIME phc offset 29 s2 freq +9477 delay 5592 phc2sys[4907.303]: CLOCK_REALTIME phc offset 12 s2 freq +9468 delay 5604 phc2sys[4908.303]: CLOCK_REALTIME phc offset 6 s2 freq +9466 delay 5220 phc2sys[4909.304]: CLOCK_REALTIME phc offset -22 s2 freq +9440 delay 5544 phc2sys[4910.304]: CLOCK_REALTIME phc offset 3 s2 freq +9458 delay 5592 phc2sys[4911.305]: CLOCK_REALTIME phc offset 9 s2 freq +9465 delay 5592 phc2sys[4912.305]: CLOCK_REALTIME phc offset 1 s2 freq +9460 delay 5604 phc2sys[4913.305]: CLOCK_REALTIME phc offset -22 s2 freq +9437 delay 5544 phc2sys[4914.306]: CLOCK_REALTIME phc offset 18 s2 freq +9470 delay 5592 phc2sys[4915.306]: CLOCK_REALTIME phc offset 4 s2 freq +9462 delay 5616 phc2sys[4916.307]: CLOCK_REALTIME phc offset 17 s2 freq +9476 delay 5604 phc2sys[4917.307]: CLOCK_REALTIME phc offset -23 s2 freq +9441 delay 5592 phc2sys[4918.308]: CLOCK_REALTIME phc offset -80 s2 freq +9377 delay 5628 phc2sys[4919.308]: CLOCK_REALTIME phc offset 65 s2 freq +9498 delay 5604 phc2sys[4920.308]: CLOCK_REALTIME phc offset 13 s2 freq +9466 delay 5640 phc2sys[4921.309]: CLOCK_REALTIME phc offset 16 s2 freq +9473 delay 5615 phc2sys[4922.309]: CLOCK_REALTIME phc offset 5 s2 freq +9466 delay 5604 phc2sys[4923.310]: CLOCK_REALTIME phc offset -6 s2 freq +9457 delay 5604 phc2sys[4924.310]: CLOCK_REALTIME phc offset -12 s2 freq +9449 delay 5604

Diego

vladimiroltean commented 4 years ago

Much smaller. Not touching anything. Just I stopped and run it again

Maybe just enough time has passed from the beginning of 1970 that clock stepping doesn't error out any longer? There are bugs surrounding the clock stepping of CLOCK_REALTIME to a value close to 0 (Jan 1st 1970), and nobody is actively looking into fixing them, because nobody is in 1970 anymore.

vladimiroltean commented 4 years ago

Changing the master time to 2020, I got these results running phc2sys on my node, but this time, the Linux system time is kept in 1970.

How do you know that the Linux system time is kept in 1970? What does phc_ctl CLOCK_REALTIME get say?

diegotxegp commented 4 years ago

As you said to me, I update LS1021ATSN time to current time in 2020:

[root@LS1021ATSN ~] # phc_ctl CLOCK_REALTIME get phc_ctl[8940.338]: clock time is 1592821706.513017528 or Mon Jun 22 10:28:26 2020

But the node is kept in 1970: nodo2@nodo2-N-A:~$ phc_ctl CLOCK_REALTIME get phc_ctl[8609.960]: clock time is 8876.479821394 or Thu Jan 1 03:27:56 1970

And the synchronisation with ptp4l between the LS1021ATSN platform and the node, and the phc2sys of the node show these results:

LS1021ATSN

[root@LS1021ATSN ~] # ptp4l -i swp2 -i swp3 -f /etc/ptp4l_cfg/gPTP.cfg -m --tx_timestamp_timeout 20 ptp4l[5072.712]: selected /dev/ptp1 as PTP clock ptp4l[5072.800]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[5072.880]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[5072.882]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[5075.898]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[5075.898]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[5075.898]: assuming the grand master role ptp4l[5076.603]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[5076.603]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[5076.604]: assuming the grand master role ptp4l[5076.604]: assuming the grand master role ptp4l[5084.536]: port 2: new foreign master aabbcc.fffe.00094a-1 ptp4l[5084.536]: selected best master clock aabbcc.fffe.00094a ptp4l[5084.537]: assuming the grand master role ptp4l[5084.537]: assuming the grand master role

Node

nodo2@nodo2-N-A:~$ sudo ptp4l -i enp3s0 -f /home/nodo2/linuxptp-2.0/configs/gPTP.cfg -m --tx_timestamp_timeout 20 [sudo] password for nodo2: ptp4l[4775.805]: selected /dev/ptp0 as PTP clock ptp4l[4775.844]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[4775.844]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[4779.748]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[4779.750]: selected local clock aabbcc.fffe.00094a as best master ptp4l[4779.752]: assuming the grand master role ptp4l[4779.824]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[4781.825]: selected best master clock 00049f.fffe.ef0808 ptp4l[4781.825]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[4782.097]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[4782.849]: rms 1794 max 2384 freq +12407 +/- 1246 delay 234 +/- 0 ptp4l[4783.850]: rms 337 max 518 freq +13511 +/- 450 delay 233 +/- 0 ptp4l[4784.855]: rms 563 max 588 freq +14519 +/- 149 delay 233 +/- 0 ptp4l[4785.857]: rms 351 max 470 freq +14706 +/- 17 delay 234 +/- 0 ptp4l[4786.858]: rms 109 max 183 freq +14590 +/- 42 delay 234 +/- 0 ptp4l[4787.860]: rms 21 max 31 freq +14469 +/- 25 delay 235 +/- 0 ptp4l[4788.861]: rms 31 max 36 freq +14418 +/- 8 delay 236 +/- 0 ptp4l[4789.862]: rms 18 max 30 freq +14412 +/- 5 delay 236 +/- 0 ptp4l[4790.864]: rms 9 max 14 freq +14413 +/- 6 delay 236 +/- 0 ptp4l[4791.865]: rms 4 max 6 freq +14414 +/- 3 delay 236 +/- 0 ptp4l[4792.867]: rms 4 max 7 freq +14423 +/- 4 delay 236 +/- 0 ptp4l[4793.868]: rms 3 max 6 freq +14425 +/- 3 delay 236 +/- 0 ptp4l[4794.869]: rms 3 max 5 freq +14424 +/- 4 delay 236 +/- 0 ptp4l[4795.871]: rms 3 max 5 freq +14420 +/- 4 delay 236 +/- 0 ptp4l[4796.872]: rms 2 max 4 freq +14421 +/- 3 delay 236 +/- 0 ptp4l[4797.873]: rms 4 max 8 freq +14426 +/- 4 delay 236 +/- 0 ptp4l[4798.875]: rms 5 max 7 freq +14420 +/- 6 delay 236 +/- 0 ptp4l[4799.876]: rms 3 max 6 freq +14418 +/- 3 delay 236 +/- 0 ptp4l[4800.878]: rms 3 max 4 freq +14422 +/- 3 delay 236 +/- 0 ptp4l[4801.879]: rms 5 max 8 freq +14426 +/- 6 delay 235 +/- 0 ptp4l[4802.880]: rms 4 max 6 freq +14425 +/- 5 delay 235 +/- 0 ptp4l[4803.882]: rms 3 max 4 freq +14422 +/- 3 delay 235 +/- 0 ptp4l[4804.883]: rms 4 max 6 freq +14419 +/- 4 delay 236 +/- 0 ptp4l[4805.884]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4806.886]: rms 3 max 5 freq +14423 +/- 4 delay 236 +/- 0 ptp4l[4807.887]: rms 3 max 3 freq +14423 +/- 4 delay 236 +/- 0 ptp4l[4808.889]: rms 4 max 8 freq +14418 +/- 5 delay 236 +/- 0 ptp4l[4809.890]: rms 3 max 5 freq +14418 +/- 3 delay 236 +/- 0 ptp4l[4810.892]: rms 3 max 5 freq +14422 +/- 4 delay 237 +/- 0 ptp4l[4811.893]: rms 2 max 4 freq +14423 +/- 3 delay 237 +/- 0 ptp4l[4812.894]: rms 3 max 5 freq +14423 +/- 4 delay 236 +/- 0 ptp4l[4813.896]: rms 2 max 3 freq +14423 +/- 3 delay 236 +/- 0 ptp4l[4814.898]: rms 2 max 4 freq +14422 +/- 3 delay 236 +/- 0 ptp4l[4815.899]: rms 2 max 4 freq +14421 +/- 3 delay 234 +/- 0 ptp4l[4816.900]: rms 3 max 4 freq +14424 +/- 3 delay 233 +/- 0 ptp4l[4817.901]: rms 3 max 5 freq +14423 +/- 4 delay 233 +/- 0 ptp4l[4818.903]: rms 3 max 4 freq +14421 +/- 3 delay 233 +/- 0 ptp4l[4819.904]: rms 3 max 4 freq +14420 +/- 3 delay 233 +/- 0 ptp4l[4820.906]: rms 3 max 5 freq +14423 +/- 4 delay 233 +/- 0 ptp4l[4821.907]: rms 2 max 3 freq +14422 +/- 3 delay 235 +/- 0 ptp4l[4822.908]: rms 5 max 9 freq +14427 +/- 6 delay 236 +/- 0 ptp4l[4823.910]: rms 4 max 6 freq +14420 +/- 4 delay 237 +/- 0 ptp4l[4824.911]: rms 3 max 4 freq +14423 +/- 4 delay 237 +/- 0 ptp4l[4825.913]: rms 2 max 3 freq +14422 +/- 3 delay 237 +/- 0 ptp4l[4826.914]: rms 3 max 5 freq +14425 +/- 4 delay 237 +/- 0 ptp4l[4827.916]: rms 2 max 4 freq +14423 +/- 3 delay 237 +/- 0 ptp4l[4828.917]: rms 3 max 6 freq +14422 +/- 4 delay 237 +/- 0 ptp4l[4829.918]: rms 3 max 5 freq +14423 +/- 5 delay 236 +/- 0 ptp4l[4830.920]: rms 4 max 5 freq +14423 +/- 5 delay 236 +/- 0 ptp4l[4831.921]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4832.922]: rms 2 max 4 freq +14422 +/- 3 delay 237 +/- 0 ptp4l[4833.923]: rms 3 max 5 freq +14421 +/- 4 delay 237 +/- 0 ptp4l[4834.925]: rms 2 max 4 freq +14422 +/- 3 delay 237 +/- 0 ptp4l[4835.926]: rms 2 max 4 freq +14422 +/- 3 delay 237 +/- 0 ptp4l[4836.928]: rms 5 max 11 freq +14425 +/- 7 delay 236 +/- 0 ptp4l[4837.929]: rms 4 max 6 freq +14429 +/- 3 delay 236 +/- 0 ptp4l[4838.930]: rms 3 max 6 freq +14422 +/- 3 delay 235 +/- 0 ptp4l[4839.931]: rms 3 max 6 freq +14421 +/- 4 delay 234 +/- 0 ptp4l[4840.933]: rms 2 max 4 freq +14422 +/- 3 delay 233 +/- 0 ptp4l[4841.934]: rms 3 max 4 freq +14421 +/- 3 delay 233 +/- 0 ptp4l[4842.936]: rms 3 max 5 freq +14421 +/- 4 delay 233 +/- 0 ptp4l[4843.937]: rms 2 max 4 freq +14422 +/- 3 delay 233 +/- 0 ptp4l[4844.938]: rms 2 max 5 freq +14422 +/- 3 delay 233 +/- 0 ptp4l[4845.940]: rms 3 max 4 freq +14424 +/- 3 delay 233 +/- 0 ptp4l[4846.941]: rms 4 max 6 freq +14425 +/- 5 delay 233 +/- 0 ptp4l[4847.942]: rms 3 max 7 freq +14423 +/- 5 delay 234 +/- 0 ptp4l[4848.944]: rms 4 max 6 freq +14421 +/- 5 delay 236 +/- 0 ptp4l[4849.945]: rms 3 max 6 freq +14420 +/- 4 delay 237 +/- 0 ptp4l[4850.947]: rms 2 max 4 freq +14420 +/- 3 delay 237 +/- 0 ptp4l[4851.948]: rms 2 max 4 freq +14422 +/- 3 delay 237 +/- 0 ptp4l[4852.949]: rms 3 max 4 freq +14419 +/- 3 delay 237 +/- 0 ptp4l[4853.951]: rms 2 max 4 freq +14420 +/- 3 delay 237 +/- 0 ptp4l[4854.952]: rms 3 max 4 freq +14421 +/- 4 delay 237 +/- 0 ptp4l[4855.954]: rms 3 max 4 freq +14423 +/- 3 delay 237 +/- 0 ptp4l[4856.955]: rms 2 max 3 freq +14423 +/- 3 delay 237 +/- 0 ptp4l[4857.956]: rms 3 max 5 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4858.958]: rms 5 max 11 freq +14426 +/- 6 delay 236 +/- 0 ptp4l[4859.959]: rms 3 max 5 freq +14425 +/- 4 delay 236 +/- 0 ptp4l[4860.960]: rms 3 max 6 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4861.962]: rms 2 max 5 freq +14421 +/- 3 delay 236 +/- 0 ptp4l[4862.963]: rms 2 max 3 freq +14421 +/- 3 delay 237 +/- 0 ptp4l[4863.964]: rms 2 max 3 freq +14422 +/- 3 delay 235 +/- 0 ptp4l[4864.968]: rms 3 max 5 freq +14424 +/- 4 delay 237 +/- 0 ptp4l[4865.968]: rms 3 max 5 freq +14421 +/- 4 delay 237 +/- 0 ptp4l[4866.969]: rms 2 max 4 freq +14421 +/- 3 delay 235 +/- 0 ptp4l[4867.970]: rms 3 max 6 freq +14423 +/- 4 delay 235 +/- 0 ptp4l[4868.971]: rms 2 max 3 freq +14423 +/- 3 delay 236 +/- 0 ptp4l[4869.972]: rms 3 max 5 freq +14420 +/- 3 delay 236 +/- 0 ptp4l[4870.974]: rms 3 max 4 freq +14420 +/- 4 delay 234 +/- 0 ptp4l[4871.975]: rms 3 max 5 freq +14423 +/- 4 delay 233 +/- 0 ptp4l[4872.977]: rms 3 max 5 freq +14422 +/- 4 delay 233 +/- 0 ptp4l[4873.978]: rms 3 max 4 freq +14421 +/- 3 delay 233 +/- 0 ptp4l[4874.980]: rms 3 max 4 freq +14422 +/- 4 delay 233 +/- 0 ptp4l[4875.982]: rms 4 max 7 freq +14418 +/- 4 delay 234 +/- 0 ptp4l[4876.984]: rms 3 max 5 freq +14418 +/- 3 delay 234 +/- 0 ptp4l[4877.985]: rms 2 max 5 freq +14421 +/- 3 delay 234 +/- 0 ptp4l[4878.987]: rms 2 max 4 freq +14422 +/- 3 delay 234 +/- 0 ptp4l[4879.988]: rms 5 max 8 freq +14425 +/- 6 delay 234 +/- 0 ptp4l[4880.990]: rms 4 max 7 freq +14417 +/- 3 delay 234 +/- 0 ptp4l[4881.991]: rms 3 max 5 freq +14421 +/- 4 delay 234 +/- 0 ptp4l[4882.992]: rms 3 max 4 freq +14422 +/- 4 delay 236 +/- 0 ptp4l[4883.994]: rms 2 max 4 freq +14421 +/- 3 delay 236 +/- 0 ptp4l[4884.995]: rms 2 max 4 freq +14421 +/- 3 delay 236 +/- 0 ptp4l[4885.996]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4886.998]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4887.999]: rms 3 max 5 freq +14422 +/- 4 delay 236 +/- 0 ptp4l[4889.006]: rms 3 max 5 freq +14420 +/- 4 delay 236 +/- 0 ptp4l[4890.002]: rms 3 max 5 freq +14420 +/- 4 delay 236 +/- 0 ptp4l[4891.003]: rms 2 max 4 freq +14420 +/- 3 delay 236 +/- 0 ptp4l[4892.004]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4893.006]: rms 4 max 8 freq +14419 +/- 5 delay 236 +/- 0 ptp4l[4894.007]: rms 3 max 5 freq +14420 +/- 4 delay 236 +/- 0 ptp4l[4895.008]: rms 4 max 6 freq +14423 +/- 5 delay 236 +/- 0 ptp4l[4896.010]: rms 3 max 5 freq +14419 +/- 4 delay 236 +/- 0 ptp4l[4897.011]: rms 3 max 4 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4898.013]: rms 2 max 4 freq +14422 +/- 3 delay 235 +/- 0 ptp4l[4899.014]: rms 3 max 4 freq +14421 +/- 4 delay 237 +/- 0 ptp4l[4900.015]: rms 5 max 10 freq +14413 +/- 4 delay 237 +/- 0 ptp4l[4901.017]: rms 3 max 6 freq +14421 +/- 3 delay 237 +/- 0 ptp4l[4902.018]: rms 3 max 4 freq +14420 +/- 4 delay 237 +/- 0 ptp4l[4903.019]: rms 4 max 8 freq +14416 +/- 4 delay 236 +/- 0 ptp4l[4904.021]: rms 2 max 4 freq +14421 +/- 2 delay 237 +/- 0 ptp4l[4905.022]: rms 4 max 7 freq +14416 +/- 5 delay 236 +/- 0 ptp4l[4906.023]: rms 5 max 9 freq +14421 +/- 6 delay 236 +/- 0 ptp4l[4907.025]: rms 3 max 4 freq +14420 +/- 4 delay 234 +/- 0 ptp4l[4908.026]: rms 3 max 5 freq +14421 +/- 4 delay 236 +/- 0 ptp4l[4909.028]: rms 5 max 10 freq +14414 +/- 5 delay 234 +/- 0 ptp4l[4910.029]: rms 3 max 5 freq +14422 +/- 3 delay 234 +/- 0 ptp4l[4911.030]: rms 4 max 9 freq +14419 +/- 6 delay 234 +/- 0 ptp4l[4912.032]: rms 3 max 6 freq +14417 +/- 4 delay 235 +/- 0 ptp4l[4913.033]: rms 4 max 8 freq +14416 +/- 5 delay 237 +/- 0 ptp4l[4914.034]: rms 3 max 7 freq +14415 +/- 4 delay 235 +/- 0 ptp4l[4915.036]: rms 5 max 7 freq +14422 +/- 4 delay 235 +/- 0 ptp4l[4916.037]: rms 3 max 5 freq +14419 +/- 4 delay 235 +/- 0 ptp4l[4917.038]: rms 6 max 11 freq +14413 +/- 6 delay 237 +/- 0 ptp4l[4918.040]: rms 4 max 7 freq +14415 +/- 5 delay 235 +/- 0 ptp4l[4919.041]: rms 3 max 5 freq +14415 +/- 3 delay 236 +/- 0 ptp4l[4920.042]: rms 4 max 8 freq +14416 +/- 6 delay 234 +/- 0 ptp4l[4921.044]: rms 4 max 8 freq +14417 +/- 6 delay 234 +/- 0 ptp4l[4922.045]: rms 3 max 4 freq +14415 +/- 3 delay 234 +/- 0 ptp4l[4923.046]: rms 4 max 6 freq +14416 +/- 5 delay 234 +/- 0 ptp4l[4924.048]: rms 4 max 6 freq +14418 +/- 5 delay 234 +/- 0 ptp4l[4925.049]: rms 4 max 8 freq +14414 +/- 5 delay 236 +/- 0 ptp4l[4926.051]: rms 4 max 7 freq +14413 +/- 5 delay 236 +/- 0 ptp4l[4927.052]: rms 3 max 6 freq +14418 +/- 3 delay 234 +/- 0 ptp4l[4928.053]: rms 3 max 5 freq +14415 +/- 4 delay 234 +/- 0 ptp4l[4929.055]: rms 3 max 5 freq +14414 +/- 3 delay 234 +/- 0 ptp4l[4930.056]: rms 3 max 5 freq +14413 +/- 4 delay 236 +/- 0 ptp4l[4931.057]: rms 4 max 8 freq +14412 +/- 5 delay 236 +/- 0 ptp4l[4932.059]: rms 3 max 6 freq +14416 +/- 3 delay 236 +/- 0 ptp4l[4933.060]: rms 4 max 7 freq +14415 +/- 6 delay 234 +/- 0 ptp4l[4934.061]: rms 3 max 6 freq +14416 +/- 5 delay 234 +/- 0 ptp4l[4935.063]: rms 4 max 7 freq +14415 +/- 6 delay 234 +/- 0 ptp4l[4936.064]: rms 3 max 5 freq +14414 +/- 4 delay 234 +/- 0 ptp4l[4937.066]: rms 4 max 8 freq +14415 +/- 6 delay 236 +/- 0 ptp4l[4938.067]: rms 4 max 7 freq +14413 +/- 5 delay 236 +/- 0 ptp4l[4939.068]: rms 4 max 6 freq +14414 +/- 5 delay 234 +/- 0 ptp4l[4940.070]: rms 5 max 7 freq +14418 +/- 6 delay 234 +/- 0 ptp4l[4941.071]: rms 2 max 4 freq +14416 +/- 3 delay 234 +/- 0 ptp4l[4942.072]: rms 4 max 7 freq +14415 +/- 5 delay 236 +/- 0 ptp4l[4943.074]: rms 4 max 8 freq +14412 +/- 4 delay 236 +/- 0 ptp4l[4944.075]: rms 4 max 7 freq +14415 +/- 5 delay 236 +/- 0 ptp4l[4945.076]: rms 4 max 9 freq +14412 +/- 6 delay 236 +/- 0 ptp4l[4946.078]: rms 4 max 7 freq +14416 +/- 5 delay 236 +/- 0 ptp4l[4947.079]: rms 4 max 6 freq +14415 +/- 5 delay 236 +/- 0 ptp4l[4948.081]: rms 3 max 6 freq +14418 +/- 4 delay 236 +/- 0 ptp4l[4949.082]: rms 2 max 4 freq +14415 +/- 3 delay 236 +/- 0 ptp4l[4950.083]: rms 4 max 8 freq +14415 +/- 6 delay 236 +/- 0 ptp4l[4951.085]: rms 4 max 8 freq +14415 +/- 6 delay 236 +/- 0 ptp4l[4952.086]: rms 3 max 6 freq +14416 +/- 5 delay 236 +/- 0 ptp4l[4953.087]: rms 5 max 10 freq +14414 +/- 7 delay 236 +/- 0 ptp4l[4954.089]: rms 4 max 8 freq +14414 +/- 6 delay 236 +/- 0 ptp4l[4955.090]: rms 4 max 8 freq +14412 +/- 5 delay 236 +/- 0 ptp4l[4956.092]: rms 4 max 6 freq +14413 +/- 5 delay 236 +/- 0 ptp4l[4957.093]: rms 3 max 6 freq +14414 +/- 4 delay 236 +/- 0 ptp4l[4958.094]: rms 4 max 7 freq +14416 +/- 5 delay 236 +/- 0 ptp4l[4959.096]: rms 4 max 8 freq +14414 +/- 5 delay 234 +/- 0 ptp4l[4960.097]: rms 3 max 6 freq +14415 +/- 5 delay 233 +/- 0 ptp4l[4961.098]: rms 3 max 6 freq +14415 +/- 5 delay 234 +/- 0 ptp4l[4962.099]: rms 3 max 5 freq +14412 +/- 3 delay 236 +/- 0 ptp4l[4963.101]: rms 5 max 10 freq +14411 +/- 6 delay 236 +/- 0 ptp4l[4964.102]: rms 4 max 7 freq +14413 +/- 6 delay 236 +/- 0 ptp4l[4965.104]: rms 4 max 7 freq +14412 +/- 5 delay 236 +/- 0 ptp4l[4966.105]: rms 3 max 5 freq +14410 +/- 4 delay 236 +/- 0 ptp4l[4967.106]: rms 4 max 8 freq +14411 +/- 5 delay 234 +/- 0 ptp4l[4968.108]: rms 4 max 7 freq +14414 +/- 5 delay 236 +/- 0 ptp4l[4969.109]: rms 3 max 5 freq +14413 +/- 4 delay 236 +/- 0 ptp4l[4970.110]: rms 5 max 7 freq +14413 +/- 6 delay 236 +/- 0 ptp4l[4971.112]: rms 4 max 7 freq +14409 +/- 5 delay 236 +/- 0 ptp4l[4972.113]: rms 4 max 6 freq +14411 +/- 6 delay 236 +/- 0 ptp4l[4973.114]: rms 4 max 7 freq +14410 +/- 5 delay 234 +/- 0 ptp4l[4974.116]: rms 3 max 5 freq +14411 +/- 4 delay 234 +/- 0 ptp4l[4975.117]: rms 3 max 6 freq +14411 +/- 4 delay 233 +/- 0 ptp4l[4976.118]: rms 3 max 6 freq +14412 +/- 4 delay 234 +/- 0 ptp4l[4977.121]: rms 4 max 8 freq +14411 +/- 5 delay 235 +/- 0 ptp4l[4978.122]: rms 4 max 6 freq +14407 +/- 4 delay 234 +/- 0 ptp4l[4979.124]: rms 4 max 7 freq +14412 +/- 6 delay 234 +/- 0 ptp4l[4980.125]: rms 5 max 7 freq +14408 +/- 6 delay 235 +/- 0 ptp4l[4981.127]: rms 4 max 8 freq +14413 +/- 5 delay 236 +/- 0 ptp4l[4982.128]: rms 4 max 6 freq +14412 +/- 5 delay 236 +/- 0 ptp4l[4983.130]: rms 4 max 7 freq +14413 +/- 6 delay 236 +/- 0 ptp4l[4984.131]: rms 3 max 4 freq +14411 +/- 4 delay 236 +/- 0 ptp4l[4985.133]: rms 5 max 9 freq +14409 +/- 6 delay 236 +/- 0 ptp4l[4986.134]: rms 3 max 5 freq +14410 +/- 4 delay 236 +/- 0 ptp4l[4987.135]: rms 3 max 7 freq +14408 +/- 4 delay 236 +/- 0 ptp4l[4988.137]: rms 4 max 8 freq +14413 +/- 5 delay 236 +/- 0 ptp4l[4989.138]: rms 4 max 7 freq +14409 +/- 5 delay 236 +/- 0 ptp4l[4990.139]: rms 3 max 5 freq +14411 +/- 4 delay 236 +/- 0 ptp4l[4991.141]: rms 3 max 5 freq +14410 +/- 4 delay 235 +/- 0 ptp4l[4992.142]: rms 5 max 7 freq +14412 +/- 6 delay 235 +/- 0 ptp4l[4993.144]: rms 4 max 8 freq +14409 +/- 5 delay 234 +/- 0 ptp4l[4994.145]: rms 3 max 5 freq +14408 +/- 4 delay 235 +/- 0 ptp4l[4995.146]: rms 4 max 7 freq +14409 +/- 5 delay 235 +/- 0 ptp4l[4996.148]: rms 4 max 8 freq +14410 +/- 6 delay 235 +/- 0 ptp4l[4997.149]: rms 3 max 5 freq +14408 +/- 4 delay 236 +/- 0 ptp4l[4998.150]: rms 3 max 6 freq +14408 +/- 4 delay 235 +/- 0 ptp4l[4999.152]: rms 4 max 7 freq +14410 +/- 5 delay 236 +/- 0 ptp4l[5000.153]: rms 5 max 8 freq +14405 +/- 6 delay 236 +/- 0 ptp4l[5001.154]: rms 3 max 6 freq +14408 +/- 4 delay 236 +/- 0 ptp4l[5002.156]: rms 3 max 6 freq +14409 +/- 4 delay 236 +/- 0 ptp4l[5003.157]: rms 4 max 7 freq +14408 +/- 5 delay 236 +/- 0 ptp4l[5004.158]: rms 4 max 7 freq +14408 +/- 5 delay 236 +/- 0 ptp4l[5005.160]: rms 5 max 7 freq +14409 +/- 7 delay 236 +/- 0 ptp4l[5006.161]: rms 4 max 8 freq +14411 +/- 5 delay 234 +/- 0 ptp4l[5007.162]: rms 3 max 6 freq +14410 +/- 5 delay 232 +/- 0 ptp4l[5008.164]: rms 5 max 9 freq +14412 +/- 7 delay 234 +/- 0 ptp4l[5009.165]: rms 4 max 10 freq +14406 +/- 5 delay 234 +/- 0 ptp4l[5010.166]: rms 4 max 8 freq +14408 +/- 6 delay 232 +/- 0 ptp4l[5011.168]: rms 3 max 5 freq +14411 +/- 4 delay 232 +/- 0 ptp4l[5012.169]: rms 4 max 8 freq +14409 +/- 5 delay 234 +/- 0 ptp4l[5013.170]: rms 3 max 6 freq +14410 +/- 5 delay 232 +/- 0 ptp4l[5014.172]: rms 4 max 6 freq +14409 +/- 5 delay 232 +/- 0 ptp4l[5015.173]: rms 5 max 8 freq +14407 +/- 7 delay 232 +/- 0 ptp4l[5016.174]: rms 3 max 5 freq +14409 +/- 4 delay 233 +/- 0 ptp4l[5017.176]: rms 4 max 7 freq +14408 +/- 6 delay 233 +/- 0 ptp4l[5018.177]: rms 3 max 5 freq +14409 +/- 4 delay 233 +/- 0 ptp4l[5019.178]: rms 4 max 7 freq +14409 +/- 6 delay 233 +/- 0 ptp4l[5020.180]: rms 4 max 8 freq +14406 +/- 5 delay 234 +/- 0 ptp4l[5021.181]: rms 3 max 6 freq +14406 +/- 4 delay 236 +/- 0 ptp4l[5022.182]: rms 4 max 7 freq +14406 +/- 6 delay 234 +/- 0 ptp4l[5023.184]: rms 2 max 4 freq +14408 +/- 3 delay 234 +/- 0 ptp4l[5024.185]: rms 4 max 6 freq +14409 +/- 6 delay 234 +/- 0 ptp4l[5025.187]: rms 4 max 7 freq +14408 +/- 5 delay 233 +/- 0 ptp4l[5026.188]: rms 3 max 6 freq +14409 +/- 5 delay 233 +/- 0 ptp4l[5027.189]: rms 3 max 7 freq +14410 +/- 4 delay 234 +/- 0 ptp4l[5028.191]: rms 4 max 8 freq +14404 +/- 4 delay 234 +/- 0 ptp4l[5029.192]: rms 3 max 5 freq +14409 +/- 4 delay 233 +/- 0 ptp4l[5030.193]: rms 4 max 6 freq +14408 +/- 5 delay 233 +/- 0 ptp4l[5031.195]: rms 3 max 6 freq +14409 +/- 4 delay 233 +/- 0 ptp4l[5032.196]: rms 3 max 4 freq +14409 +/- 4 delay 233 +/- 0 ptp4l[5033.197]: rms 2 max 5 freq +14407 +/- 3 delay 233 +/- 0 ptp4l[5034.199]: rms 3 max 4 freq +14407 +/- 4 delay 233 +/- 0 ptp4l[5035.200]: rms 3 max 6 freq +14407 +/- 5 delay 233 +/- 0 ptp4l[5036.202]: rms 5 max 8 freq +14403 +/- 6 delay 234 +/- 0 ptp4l[5037.203]: rms 2 max 4 freq +14405 +/- 3 delay 234 +/- 0 ptp4l[5038.204]: rms 3 max 6 freq +14407 +/- 4 delay 234 +/- 0 ptp4l[5039.206]: rms 4 max 7 freq +14407 +/- 5 delay 236 +/- 0 ptp4l[5040.207]: rms 4 max 7 freq +14406 +/- 5 delay 236 +/- 0 ptp4l[5041.208]: rms 3 max 5 freq +14406 +/- 5 delay 236 +/- 0 ptp4l[5042.210]: rms 3 max 7 freq +14406 +/- 5 delay 236 +/- 0 ptp4l[5043.211]: rms 4 max 7 freq +14405 +/- 5 delay 236 +/- 0 ptp4l[5044.212]: rms 3 max 4 freq +14407 +/- 4 delay 236 +/- 0 ptp4l[5045.214]: rms 4 max 6 freq +14408 +/- 5 delay 236 +/- 0 ptp4l[5046.215]: rms 4 max 7 freq +14408 +/- 5 delay 236 +/- 0 ptp4l[5047.216]: rms 4 max 8 freq +14407 +/- 6 delay 236 +/- 0 ptp4l[5048.218]: rms 3 max 4 freq +14406 +/- 3 delay 236 +/- 0 ptp4l[5049.219]: rms 4 max 7 freq +14405 +/- 5 delay 236 +/- 0 ptp4l[5050.220]: rms 4 max 7 freq +14404 +/- 6 delay 236 +/- 0 ptp4l[5051.222]: rms 3 max 6 freq +14407 +/- 4 delay 236 +/- 0 ptp4l[5052.223]: rms 4 max 7 freq +14404 +/- 5 delay 236 +/- 0 ptp4l[5053.224]: rms 2 max 4 freq +14405 +/- 3 delay 236 +/- 0 ptp4l[5054.226]: rms 4 max 7 freq +14406 +/- 6 delay 236 +/- 0 ptp4l[5055.227]: rms 3 max 6 freq +14406 +/- 5 delay 236 +/- 0 ptp4l[5056.229]: rms 4 max 6 freq +14404 +/- 5 delay 236 +/- 0 ptp4l[5057.230]: rms 4 max 6 freq +14406 +/- 5 delay 234 +/- 0 ptp4l[5058.231]: rms 3 max 4 freq +14405 +/- 3 delay 233 +/- 0 ptp4l[5059.233]: rms 4 max 6 freq +14405 +/- 5 delay 233 +/- 0 ptp4l[5060.234]: rms 2 max 4 freq +14406 +/- 3 delay 233 +/- 0 ptp4l[5061.235]: rms 3 max 5 freq +14404 +/- 4 delay 233 +/- 0 ptp4l[5062.237]: rms 4 max 7 freq +14404 +/- 6 delay 233 +/- 0 ptp4l[5063.238]: rms 3 max 4 freq +14404 +/- 3 delay 233 +/- 0 ptp4l[5064.240]: rms 3 max 6 freq +14402 +/- 5 delay 234 +/- 0 ptp4l[5065.241]: rms 5 max 7 freq +14403 +/- 6 delay 234 +/- 0 ptp4l[5066.242]: rms 3 max 5 freq +14402 +/- 4 delay 236 +/- 0 ptp4l[5067.243]: rms 3 max 3 freq +14403 +/- 3 delay 236 +/- 0 ptp4l[5068.245]: rms 5 max 8 freq +14405 +/- 6 delay 236 +/- 0 ptp4l[5069.246]: rms 3 max 4 freq +14403 +/- 4 delay 236 +/- 0 ptp4l[5070.247]: rms 2 max 4 freq +14406 +/- 3 delay 236 +/- 0 ptp4l[5071.249]: rms 5 max 8 freq +14402 +/- 6 delay 236 +/- 0 ptp4l[5072.250]: rms 4 max 7 freq +14406 +/- 5 delay 236 +/- 0 ptp4l[5073.252]: rms 5 max 8 freq +14402 +/- 6 delay 236 +/- 0 ptp4l[5074.253]: rms 4 max 7 freq +14405 +/- 5 delay 234 +/- 0 ptp4l[5075.254]: rms 5 max 8 freq +14403 +/- 7 delay 234 +/- 0 ptp4l[5076.256]: rms 3 max 5 freq +14404 +/- 4 delay 234 +/- 0 ptp4l[5077.257]: rms 4 max 7 freq +14404 +/- 5 delay 233 +/- 0 ptp4l[5078.258]: rms 2 max 4 freq +14403 +/- 3 delay 234 +/- 0 ptp4l[5079.261]: rms 3 max 5 freq +14401 +/- 4 delay 234 +/- 0 ptp4l[5080.263]: rms 4 max 8 freq +14401 +/- 6 delay 234 +/- 0 ptp4l[5081.012]: subscriber 000000.0000.000000-1 timed out ptp4l[5081.264]: rms 4 max 7 freq +14400 +/- 5 delay 234 +/- 0 ptp4l[5082.265]: rms 4 max 7 freq +14402 +/- 5 delay 233 +/- 0

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m [sudo] password for nodo2: phc2sys[8585.491]: reconfiguring after port state change phc2sys[8585.493]: selecting CLOCK_REALTIME for synchronization phc2sys[8585.495]: selecting enp3s0 as the master clock phc2sys[8585.496]: CLOCK_REALTIME phc offset 1592814823157685387 s0 freq +9442 delay 5364 phc2sys[8586.498]: CLOCK_REALTIME phc offset 1592814823157685530 s1 freq +9585 delay 5628 phc2sys[8587.498]: CLOCK_REALTIME phc offset -12 s2 freq +9573 delay 5364 phc2sys[8588.499]: CLOCK_REALTIME phc offset 42 s2 freq +9623 delay 5604 phc2sys[8589.499]: CLOCK_REALTIME phc offset 7 s2 freq +9601 delay 5604 phc2sys[8590.500]: CLOCK_REALTIME phc offset 24 s2 freq +9620 delay 5640 phc2sys[8591.500]: CLOCK_REALTIME phc offset -22 s2 freq +9581 delay 5604 phc2sys[8592.501]: CLOCK_REALTIME phc offset 11 s2 freq +9607 delay 5604 phc2sys[8593.501]: CLOCK_REALTIME phc offset -19 s2 freq +9581 delay 5244 phc2sys[8594.501]: CLOCK_REALTIME phc offset -12 s2 freq +9582 delay 5076 phc2sys[8595.502]: CLOCK_REALTIME phc offset 45 s2 freq +9635 delay 5640 phc2sys[8596.502]: CLOCK_REALTIME phc offset 1 s2 freq +9605 delay 5112 phc2sys[8597.502]: CLOCK_REALTIME phc offset -16 s2 freq +9588 delay 4992 phc2sys[8598.502]: CLOCK_REALTIME phc offset -27 s2 freq +9572 delay 5592 phc2sys[8599.503]: CLOCK_REALTIME phc offset 8 s2 freq +9599 delay 5604 phc2sys[8600.503]: CLOCK_REALTIME phc offset 0 s2 freq +9594 delay 5604

According what I know, both ptp4l results and phc2sys results look well, however master is in 2020 and the node in 1970.

Take a look this line in ptp4l of the node "ptp4l[5081.012]: subscriber 000000.0000.000000-1 timed out". It appears suddenly in ptp4l of the node, just once.

vladimiroltean commented 4 years ago

Assuming you have phc2sys and ptp4l on all nodes, the propagation chain of the time is like this: Master's CLOCK_REALTIME -> master's PHC (/dev/ptp0 or similar) -> slave's PHC -> slave's CLOCK_REALTIME. So, if one of your nodes has a CLOCK_REALTIME is in 1970, it means one of 2 things:

If the PHC is in 1970, it means one of 2 things:

I hope you can see where this is going. So the clock propagation tree is interrupted somewhere.

vladimiroltean commented 4 years ago

Take a look this line in ptp4l of the node "ptp4l[5081.012]: subscriber 000000.0000.000000-1 timed out". It appears suddenly in ptp4l of the node, just once.

It means ptp4l has detected that one phc2sys process has been closed.

diegotxegp commented 4 years ago

Take a look this line in ptp4l of the node "ptp4l[5081.012]: subscriber 000000.0000.000000-1 timed out". It appears suddenly in ptp4l of the node, just once.

It means ptp4l has detected that one phc2sys process has been closed.

Yes, it makes sense. I stopped it.

diegotxegp commented 4 years ago

Assuming you have phc2sys and ptp4l on all nodes, the propagation chain of the time is like this: Master's CLOCK_REALTIME -> master's PHC (/dev/ptp0 or similar) -> slave's PHC -> slave's CLOCK_REALTIME. So, if one of your nodes has a CLOCK_REALTIME is in 1970, it means one of 2 things:

* You are not synchronizing its CLOCK_REALTIME to the PHC, or

* The PHC is in 1970.

If the PHC is in 1970, it means one of 2 things:

* You are not synchronizing it to the master using ptp4l

* The master is in 1970.

I hope you can see where this is going. So the clock propagation tree is interrupted somewhere.

I understand. Let me check it.

diegotxegp commented 4 years ago

Apart from the current time of 2020 is missed somewhere. Do you think that values of ptp4l and phc2sys in LS1021ATSN and the node are acceptable? RMS, delays, phc2sys offset...

vladimiroltean commented 4 years ago

I don't like the phc2sys offsets, and now I see why.

Could you please apply this patch:

commit 09cf2f44b2c68b8e2c830b7375d5a36c45a9566e
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date:   Mon Jun 22 14:52:43 2020 +0300

    package/nxp/qoriq-ptp4l: depend on Linux kernel

    As explained in commit 24f79f6ddb05 ("package/nxp/qoriq-ptp4l: use
    compiled kernel headers"), linuxptp needs to use the compiled kernel
    headers, and for that, the kernel needs to be compiled first. So,
    linuxptp should have the kernel as a dependency.

    Not sure how come this dependency got missed.

    Fixes: 24f79f6ddb05 ("package/nxp/qoriq-ptp4l: use compiled kernel headers")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

diff --git a/package/nxp/qoriq-ptp4l/qoriq-ptp4l.mk b/package/nxp/qoriq-ptp4l/qoriq-ptp4l.mk
index 0856bdbd8cfc..3908b825a65f 100644
--- a/package/nxp/qoriq-ptp4l/qoriq-ptp4l.mk
+++ b/package/nxp/qoriq-ptp4l/qoriq-ptp4l.mk
@@ -9,6 +9,7 @@ QORIQ_PTP4L_SITE = $(call qstrip,$(BR2_PACKAGE_QORIQ_PTP4L_SITE))
 QORIQ_PTP4L_SITE_METHOD = git
 QORIQ_PTP4L_LICENSE = GPL2
 QORIQ_PTP4L_LICENSE_FILES = COPYING
+QORIQ_PTP4L_DEPENDENCIES = linux

 QORIQ_PTP4L_MAKE_OPTS = \
    prefix=/usr \

And then rebuild:

make nxp_ls1021atsn_defconfig
make qoriq-ptp4l-dirclean world
diegotxegp commented 4 years ago

Ok. If compiling it again, we solve those offsets, fine.

diegotxegp commented 4 years ago

Sorry Vladimir, but I do not find your commit 09cf2f44b2c68b8e2c830b7375d5a36c45a9566e

vladimiroltean commented 4 years ago

The procedure to apply a patch is:

  1. Go to the openil folder.
  2. Copy the patch content from here (everything inside the code block), paste it to a new text file called phc2sys-kernel-headers-bugfix.patch.
  3. Apply it using git am phc2sys-kernel-headers-bugfix.patch.
  4. Rebuild the linuxptp package using the steps above.
diegotxegp commented 4 years ago

Once compiling done, I have these results for LS1021ATSN and one node with ptp4l and phc2sys.

LS1021ATSN

[root@LS1021ATSN ~] # ptp4l -i swp2 -i swp3 -f /etc/ptp4l_cfg/gPTP.cfg -m --tx_timestamp_timeout 20 ptp4l[1212.010]: selected /dev/ptp1 as PTP clock ptp4l[1212.090]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1212.170]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1212.171]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1215.366]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1215.367]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[1215.367]: assuming the grand master role ptp4l[1215.654]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1215.654]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[1215.654]: assuming the grand master role ptp4l[1215.654]: assuming the grand master role ptp4l[1248.812]: port 2: new foreign master aabbcc.fffe.00094a-1 ptp4l[1248.813]: selected best master clock aabbcc.fffe.00094a ptp4l[1248.813]: assuming the grand master role ptp4l[1248.813]: assuming the grand master role

[root@LS1021ATSN ~] # phc2sys -a -rr --transportSpecific 0x1 -m phc2sys[1223.256]: reconfiguring after port state change phc2sys[1223.261]: selecting swp3 for synchronization phc2sys[1223.262]: skipping swp2: swp3 has the same clock and is already selected phc2sys[1223.263]: selecting CLOCK_REALTIME as the master clock phc2sys[1223.265]: swp3 sys offset 4064 s0 freq -24839 delay 170400 phc2sys[1224.268]: swp3 sys offset 5760 s2 freq -23148 delay 158720 phc2sys[1225.269]: swp3 sys offset 3256 s2 freq -19892 delay 162240 phc2sys[1226.271]: swp3 sys offset 3880 s2 freq -18291 delay 157440 phc2sys[1227.272]: swp3 sys offset 4136 s2 freq -16871 delay 151760 phc2sys[1228.274]: swp3 sys offset -368 s2 freq -20134 delay 160560 phc2sys[1229.275]: swp3 sys offset -880 s2 freq -20756 delay 159520 phc2sys[1230.276]: swp3 sys offset -648 s2 freq -20788 delay 161840 phc2sys[1231.278]: swp3 sys offset 352 s2 freq -19983 delay 164400 phc2sys[1232.279]: swp3 sys offset 1648 s2 freq -18581 delay 161200 phc2sys[1233.281]: swp3 sys offset 3912 s2 freq -15823 delay 157840 phc2sys[1234.282]: swp3 sys offset 2040 s2 freq -16521 delay 161040 phc2sys[1235.284]: swp3 sys offset 2480 s2 freq -15469 delay 159920 phc2sys[1236.285]: swp3 sys offset 4656 s2 freq -12549 delay 158240 phc2sys[1237.286]: swp3 sys offset 4112 s2 freq -11696 delay 161920 phc2sys[1238.288]: swp3 sys offset 7704 s2 freq -6871 delay 158160 phc2sys[1239.289]: swp3 sys offset 3104 s2 freq -9160 delay 162720 phc2sys[1240.291]: swp3 sys offset 4536 s2 freq -6796 delay 158880 phc2sys[1241.292]: swp3 sys offset 1616 s2 freq -8356 delay 164480 phc2sys[1242.294]: swp3 sys offset 4768 s2 freq -4719 delay 158640 phc2sys[1243.295]: swp3 sys offset 7416 s2 freq -640 delay 156720 phc2sys[1244.297]: swp3 sys offset 4712 s2 freq -1120 delay 160400 phc2sys[1245.298]: swp3 sys offset 4608 s2 freq +190 delay 160560 phc2sys[1246.299]: swp3 sys offset 16248 s2 freq +13212 delay 142320 phc2sys[1247.301]: swp3 sys offset 3856 s2 freq +5695 delay 158320 phc2sys[1248.302]: swp3 sys offset -24768 s2 freq -21772 delay 162960 phc2sys[1249.304]: swp3 sys offset -22168 s2 freq -26603 delay 160160 phc2sys[1250.305]: swp3 sys offset 13416 s2 freq +2331 delay 159360 phc2sys[1251.306]: swp3 sys offset 10792 s2 freq +3732 delay 158240 phc2sys[1252.308]: swp3 sys offset 6528 s2 freq +2705 delay 161280 phc2sys[1253.309]: swp3 sys offset 6144 s2 freq +4280 delay 162400

Node

nodo2@nodo2-N-A:~$ sudo ptp4l -i enp3s0 -f /home/nodo2/linuxptp-2.0/configs/gPTP.cfg -m --tx_timestamp_timeout 20 ptp4l[1222.534]: selected /dev/ptp0 as PTP clock ptp4l[1222.592]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1222.593]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1225.720]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[1225.869]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1225.869]: selected local clock aabbcc.fffe.00094a as best master ptp4l[1225.869]: assuming the grand master role ptp4l[1227.720]: selected best master clock 00049f.fffe.ef0808 ptp4l[1227.721]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[1228.890]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[1229.516]: rms 13470107 max 26945928 freq +14976 +/- 37677 delay 226 +/- 0 ptp4l[1230.518]: rms 11440 max 17895 freq -10345 +/- 7805 delay 225 +/- 0 ptp4l[1231.520]: rms 6766 max 12578 freq -10707 +/- 7042 delay 210 +/- 0 ptp4l[1232.521]: rms 6447 max 10562 freq -5657 +/- 8871 delay 225 +/- 0 ptp4l[1233.523]: rms 6982 max 12177 freq -6169 +/- 9685 delay 226 +/- 0 ptp4l[1234.524]: rms 7332 max 13347 freq -7461 +/- 10201 delay 239 +/- 0 ptp4l[1235.525]: rms 8118 max 13513 freq -6220 +/- 11165 delay 250 +/- 0 ptp4l[1236.527]: rms 8683 max 14890 freq -6446 +/- 12000 delay 251 +/- 0 ptp4l[1237.528]: rms 13270 max 18446 freq +12427 +/- 11987 delay 252 +/- 0

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m [sudo] password for nodo2: phc2sys[1231.958]: reconfiguring after port state change phc2sys[1231.961]: selecting CLOCK_REALTIME for synchronization phc2sys[1231.963]: selecting enp3s0 as the master clock phc2sys[1231.965]: CLOCK_REALTIME phc offset 11752753625151930 s0 freq -14423 delay 5580 phc2sys[1232.967]: CLOCK_REALTIME phc offset 11752753625155998 s1 freq -10363 delay 5616 phc2sys[1233.967]: CLOCK_REALTIME phc offset -1190 s2 freq -11553 delay 5388 phc2sys[1234.967]: CLOCK_REALTIME phc offset -1820 s2 freq -12540 delay 5400 phc2sys[1235.968]: CLOCK_REALTIME phc offset -410 s2 freq -11676 delay 4908 phc2sys[1236.968]: CLOCK_REALTIME phc offset -165 s2 freq -11554 delay 4992 phc2sys[1237.968]: CLOCK_REALTIME phc offset 25477 s2 freq +14039 delay 5052 phc2sys[1238.969]: CLOCK_REALTIME phc offset 11201 s2 freq +7406 delay 5388 phc2sys[1239.969]: CLOCK_REALTIME phc offset -48488 s2 freq -48923 delay 5604 phc2sys[1240.969]: CLOCK_REALTIME phc offset -22678 s2 freq -37659 delay 5268 phc2sys[1241.970]: CLOCK_REALTIME phc offset 9430 s2 freq -12355 delay 5388 phc2sys[1242.970]: CLOCK_REALTIME phc offset 18952 s2 freq -4 delay 5556 phc2sys[1243.970]: CLOCK_REALTIME phc offset 41491 s2 freq +28221 delay 4908 phc2sys[1244.971]: CLOCK_REALTIME phc offset 15434 s2 freq +14611 delay 5388 phc2sys[1245.971]: CLOCK_REALTIME phc offset -60072 s2 freq -56265 delay 5088 phc2sys[1246.971]: CLOCK_REALTIME phc offset -29844 s2 freq -44058 delay 5556 phc2sys[1247.971]: CLOCK_REALTIME phc offset 10365 s2 freq -12803 delay 5388 phc2sys[1248.972]: CLOCK_REALTIME phc offset 50983 s2 freq +30925 delay 5556 phc2sys[1249.972]: CLOCK_REALTIME phc offset 25907 s2 freq +21144 delay 5616 phc2sys[1250.973]: CLOCK_REALTIME phc offset -52333 s2 freq -49324 delay 5616 phc2sys[1251.973]: CLOCK_REALTIME phc offset -30783 s2 freq -43474 delay 5592 phc2sys[1252.973]: CLOCK_REALTIME phc offset 7281 s2 freq -14645 delay 5244 phc2sys[1253.974]: CLOCK_REALTIME phc offset 21167 s2 freq +1425 delay 5184 phc2sys[1254.974]: CLOCK_REALTIME phc offset 45930 s2 freq +32539 delay 5616 phc2sys[1255.974]: CLOCK_REALTIME phc offset 15132 s2 freq +15520 delay 5388 phc2sys[1256.975]: CLOCK_REALTIME phc offset -60804 s2 freq -55877 delay 5556 phc2sys[1257.975]: CLOCK_REALTIME phc offset -29323 s2 freq -42637 delay 5628 phc2sys[1258.976]: CLOCK_REALTIME phc offset 7040 s2 freq -15071 delay 5256 phc2sys[1259.976]: CLOCK_REALTIME phc offset 49934 s2 freq +29935 delay 5244 phc2sys[1260.976]: CLOCK_REALTIME phc offset 27125 s2 freq +22106 delay 4968

They have similar values as before compiling.

vladimiroltean commented 4 years ago

Yes, nothing improved. Do you still have the build log? Also, what are your latest OpenIL commits? git log --oneline -10.

diegotxegp commented 4 years ago

user@user-VirtualBox:~/openil/output/images$ git log --oneline -10 118b7c5 Merge pull request #144 in DNIND/openil from ~NXA08424/openil:2020.02-dev-0529 to 2020.02-dev 94f52db ubuntu: remove to the proxy for wget and check the rootfs path 30713d5 Merge pull request #142 in DNIND/openil from ~NXA08424/openil:2020.02-dev-0526 to 2020.02-dev ccc212c package/nxp/qoriq-tsntool: bump to version OpenIL-v1.8-202005 858285a Merge pull request #139 in DNIND/openil from ~NXA08424/openil:2020.02-dev-0524 to 2020.02-dev e15c5f0 package/qoriq-ptp4l: pull upstream patch for removing snmp4lptp 87fdad7 Merge pull request #138 in DNIND/openil from ~NXF46132/openil:2020.02-dev to 2020.02-dev 192f03d package/qoriq-libnfc-nci: modify the version of libnfc-nci to R2.4 47d22e5 Merge pull request #137 in DNIND/openil from ~NXF24402/openil:2020.02-dev-0522 to 2020.02-dev a3ab31e Add file sysrepo-tsn.service

vladimiroltean commented 4 years ago

And the build log? Note that the patch has been applied on the master branch in the meantime. I'm rebuilding nxp_ls1021atsn_defconfig from scratch to check if there's anything I've missed again, but I don't expect that to be the case.

diegotxegp commented 4 years ago

Here your are the log.

user@user-VirtualBox:~/openil$ make qoriq-ptp4l-dirclean world rm -Rf /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d /usr/bin/make -j1 O=/home/diegotxe/openil/output HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" syncconfig WARNING: no hash file for qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz

qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Extracting gzip -d -c /home/diegotxe/openil/dl/qoriq-ptp4l/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz | tar --strip-components=1 -C /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d -xf - qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Patching

Applying 0001-Remove-the-unfinished-SNMP-code.patch using patch: patching file makefile patching file snmp4lptp.8 patching file snmp4lptp.c patching file snmp4lptp_mib.h patching file snmpflg.sh

qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Configuring qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Building export PKG_CONFIG_SYSROOT_DIR="/home/diegotxe/openil/output/host/arm-buildroot-linux-gnueabihf/sysroot"; export KBUILD_OUTPUT="/home/diegotxe/openil/output/build/linux-"OpenIL-v1.8-linux-202005""; PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/bin/make -j1 prefix=/usr CC="/home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc" CROSS_COMPILE="/home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-" -C /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d DEPEND timemaster.c DEPEND sysoff.c DEPEND pmc_common.c DEPEND pmc.c DEPEND phc_ctl.c DEPEND phc2sys.c DEPEND nsm.c DEPEND hwstamp_ctl.c DEPEND version.c DEPEND util.c DEPEND unicast_service.c DEPEND unicast_fsm.c DEPEND unicast_client.c DEPEND uds.c DEPEND udp6.c DEPEND udp.c DEPEND tsproc.c DEPEND transport.c DEPEND tlv.c DEPEND telecom.c DEPEND tc.c DEPEND stats.c DEPEND sk.c DEPEND servo.c DEPEND rtnl.c DEPEND raw.c DEPEND p2p_tc.c DEPEND ptp4l.c DEPEND print.c DEPEND pqueue.c DEPEND port_signaling.c DEPEND port.c DEPEND pi.c DEPEND phc.c DEPEND nullf.c DEPEND ntpshm.c DEPEND msg.c DEPEND mmedian.c DEPEND mave.c DEPEND linreg.c DEPEND hash.c DEPEND fsm.c DEPEND filter.c DEPEND fault.c DEPEND e2e_tc.c DEPEND designated_fsm.c DEPEND config.c DEPEND clockcheck.c DEPEND clockadj.c DEPEND clock.c DEPEND bmc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o ptp4l.o ptp4l.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o bmc.o bmc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o clock.o clock.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o clockadj.o clockadj.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o clockcheck.o clockcheck.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o config.o config.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o designated_fsm.o designated_fsm.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o e2e_tc.o e2e_tc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o fault.o fault.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o filter.o filter.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o fsm.o fsm.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o hash.o hash.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o linreg.o linreg.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o mave.o mave.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o mmedian.o mmedian.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o msg.o msg.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o ntpshm.o ntpshm.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o nullf.o nullf.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o phc.o phc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o pi.o pi.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o port.o port.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o port_signaling.o port_signaling.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o pqueue.o pqueue.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o print.o print.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o p2p_tc.o p2p_tc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o raw.o raw.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o rtnl.o rtnl.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o servo.o servo.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o sk.o sk.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o stats.o stats.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o tc.o tc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o telecom.o telecom.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o tlv.o tlv.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o transport.o transport.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o tsproc.o tsproc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o udp.o udp.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o udp6.o udp6.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o uds.o uds.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o unicast_client.o unicast_client.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o unicast_fsm.o unicast_fsm.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o unicast_service.o unicast_service.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o util.o util.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o version.o version.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc ptp4l.o bmc.o clock.o clockadj.o clockcheck.o config.o designated_fsm.o e2e_tc.o fault.o filter.o fsm.o hash.o linreg.o mave.o mmedian.o msg.o ntpshm.o nullf.o phc.o pi.o port.o port_signaling.o pqueue.o print.o p2p_tc.o raw.o rtnl.o servo.o sk.o stats.o tc.o telecom.o tlv.o transport.o tsproc.o udp.o udp6.o uds.o unicast_client.o unicast_fsm.o unicast_service.o util.o version.o -lm -lrt -o ptp4l /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o hwstamp_ctl.o hwstamp_ctl.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc hwstamp_ctl.o version.o -lm -lrt -o hwstamp_ctl /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o nsm.o nsm.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc nsm.o config.o filter.o hash.o mave.o mmedian.o msg.o print.o raw.o rtnl.o sk.o transport.o tlv.o tsproc.o udp.o udp6.o uds.o util.o version.o -lm -lrt -o nsm /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o phc2sys.o phc2sys.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o pmc_common.o pmc_common.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o sysoff.o sysoff.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc phc2sys.o clockadj.o clockcheck.o config.o hash.o linreg.o msg.o ntpshm.o nullf.o phc.o pi.o pmc_common.o print.o raw.o servo.o sk.o stats.o sysoff.o tlv.o transport.o udp.o udp6.o uds.o util.o version.o -lm -lrt -o phc2sys /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o phc_ctl.o phc_ctl.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc phc_ctl.o phc.o sk.o util.o clockadj.o sysoff.o print.o version.o -lm -lrt -o phc_ctl /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o pmc.o pmc.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc pmc.o config.o hash.o msg.o pmc_common.o print.o raw.o sk.o tlv.o transport.o udp.o udp6.o uds.o util.o version.o -lm -lrt -o pmc /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o timemaster.o timemaster.c /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc timemaster.o print.o rtnl.o sk.o util.o version.o -lm -lrt -o timemaster qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Installing to target export PKG_CONFIG_SYSROOT_DIR="/home/diegotxe/openil/output/host/arm-buildroot-linux-gnueabihf/sysroot"; export KBUILD_OUTPUT="/home/diegotxe/openil/output/build/linux-"OpenIL-v1.8-linux-202005""; PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/bin/make -j1 prefix=/usr CC="/home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-gcc" CROSS_COMPILE="/home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-" -C /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d DESTDIR=/home/diegotxe/openil/output/target install; /usr/bin/install -d /home/diegotxe/openil/output/target/etc/ptp4l_cfg; /usr/bin/install /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/configs/ /home/diegotxe/openil/output/target/etc/ptp4l_cfg install -p -m 755 -d /home/diegotxe/openil/output/target/usr/sbin /home/diegotxe/openil/output/target/usr/man/man8 install ptp4l hwstamp_ctl nsm phc2sys phc_ctl pmc timemaster /home/diegotxe/openil/output/target/usr/sbin for x in ptp4l.8 hwstamp_ctl.8 nsm.8 phc2sys.8 phc_ctl.8 pmc.8 timemaster.8; do \ [ -f $x ] && install -p -m 644 -t /home/diegotxe/openil/output/target/usr/man/man8 $x ; \ done Finalizing host directory Finalizing target directory grep -qsE '^/bin/bash$' /home/diegotxe/openil/output/target/etc/shells || echo "/bin/bash" >> /home/diegotxe/openil/output/target/etc/shells if grep -q CONFIG_ASH=y ./.config; then grep -qsE '^/bin/ash$' /home/diegotxe/openil/output/target/etc/shells || echo "/bin/ash" >> /home/diegotxe/openil/output/target/etc/shells; fi if grep -q CONFIG_HUSH=y ./.config; then grep -qsE '^/bin/hush$' /home/diegotxe/openil/output/target/etc/shells || echo "/bin/hush" >> /home/diegotxe/openil/output/target/etc/shells; fi rm -f /home/diegotxe/openil/output/target/usr/share/glib-2.0/schemas/.xml /home/diegotxe/openil/output/target/usr/share/glib-2.0/schemas/.dtd /home/diegotxe/openil/output/host/bin/glib-compile-schemas /home/diegotxe/openil/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/share/glib-2.0/schemas --targetdir=/home/diegotxe/openil/output/target/usr/share/glib-2.0/schemas No se encontró ningún archivo de esquemas: no se hace nada. /bin/sed -i -e '/^hosts:/ {/mdns4/! s/dns/mdns4_minimal [NOTFOUND=return] dns mdns4/}' /home/diegotxe/openil/output/target/etc/nsswitch.conf rm -rf /home/diegotxe/openil/output/target/usr/lib/perl5/5.30.1/pod rm -rf /home/diegotxe/openil/output/target/usr/lib/perl5/5.30.1/arm-linux/CORE find /home/diegotxe/openil/output/target/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f find /home/diegotxe/openil/output/target/usr/lib/perl5/ -name '.bs' -print0 | xargs -0 rm -f find /home/diegotxe/openil/output/target/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f PYTHONPATH="/home/diegotxe/openil/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/python2.7/sysconfigdata/" cd /home/diegotxe/openil/output/target && /home/diegotxe/openil/output/host/bin/python2.7 /home/diegotxe/openil/support/scripts/pycompile.py usr/lib/python2.7 find /home/diegotxe/openil/output/target/usr/lib/python2.7 -name '.pyo' -print0 | xargs -0 --no-run-if-empty rm -f mkdir -p /home/diegotxe/openil/output/target/etc echo "LS1021ATSN" > /home/diegotxe/openil/output/target/etc/hostname /bin/sed -i -e '$a \127.0.1.1\tLS1021ATSN' -e '/^127.0.1.1/d' /home/diegotxe/openil/output/target/etc/hosts mkdir -p /home/diegotxe/openil/output/target/etc echo "Welcome to OpenIL" > /home/diegotxe/openil/output/target/etc/issue /bin/sed -i -e s,^root:[^:]:,root::, /home/diegotxe/openil/output/target/etc/shadow grep -qsE '^/bin/sh$' /home/diegotxe/openil/output/target/etc/shells || echo "/bin/sh" >> /home/diegotxe/openil/output/target/etc/shells ln -sf bash /home/diegotxe/openil/output/target/bin/sh /bin/sed -i -e '/^root:/s,[^/]$,bash,' /home/diegotxe/openil/output/target/etc/passwd /home/diegotxe/openil/output/host/bin/udevadm hwdb --update --root /home/diegotxe/openil/output/target /home/diegotxe/openil/output/host/bin/systemctl --root=/home/diegotxe/openil/output/target preset-all Created symlink /home/diegotxe/openil/output/target/etc/systemd/system/multi-user.target.wants/phc2sys.service → /usr/lib/systemd/system/phc2sys.service. Created symlink /home/diegotxe/openil/output/target/etc/systemd/system/multi-user.target.wants/ptp4l.service → /usr/lib/systemd/system/ptp4l.service. grep -qsE '^/usr/bin/tmux$' /home/diegotxe/openil/output/target/etc/shells || echo "/usr/bin/tmux" >> /home/diegotxe/openil/output/target/etc/shells rm -f /home/diegotxe/openil/output/build/locales.nopurge for i in C en_US locale-archive; do echo $i >> /home/diegotxe/openil/output/build/locales.nopurge; done for dir in /home/diegotxe/openil/output/target/usr/share/locale; do for langdir in $dir/; do if [ -e "${langdir}" ]; then grep -qx "${langdir##/}" /home/diegotxe/openil/output/build/locales.nopurge || rm -rf $langdir; fi done; done if [ -d /home/diegotxe/openil/output/target/usr/share/X11/locale ]; then for lang in C en_US; do if [ -f /home/diegotxe/openil/output/target/usr/share/X11/locale/$lang/XLC_LOCALE ]; then echo "$lang/XLC_LOCALE: $lang"; fi done > /home/diegotxe/openil/output/target/usr/share/X11/locale/locale.dir; fi rm -rf /home/diegotxe/openil/output/target/usr/include /home/diegotxe/openil/output/target/usr/share/aclocal \ /home/diegotxe/openil/output/target/usr/lib/pkgconfig /home/diegotxe/openil/output/target/usr/share/pkgconfig \ /home/diegotxe/openil/output/target/usr/lib/cmake /home/diegotxe/openil/output/target/usr/share/cmake find /home/diegotxe/openil/output/target/usr/{lib,share}/ -name '.cmake' -print0 | xargs -0 rm -f find /home/diegotxe/openil/output/target/lib/ /home/diegotxe/openil/output/target/usr/lib/ /home/diegotxe/openil/output/target/usr/libexec/ \ ( -name '.a' -o -name '.la' ) -print0 | xargs -0 rm -f rm -rf /home/diegotxe/openil/output/target/usr/share/gdb rm -rf /home/diegotxe/openil/output/target/usr/share/zsh rm -rf /home/diegotxe/openil/output/target/usr/man /home/diegotxe/openil/output/target/usr/share/man rm -rf /home/diegotxe/openil/output/target/usr/info /home/diegotxe/openil/output/target/usr/share/info rm -rf /home/diegotxe/openil/output/target/usr/doc /home/diegotxe/openil/output/target/usr/share/doc rm -rf /home/diegotxe/openil/output/target/usr/share/gtk-doc rmdir /home/diegotxe/openil/output/target/usr/share 2>/dev/null || true find /home/diegotxe/openil/output/target -type f ( -perm /111 -o -name '.so' ) -not ( -name 'libpthread.so' -o -name 'ld-.so' -o -name '.ko' ) -print0 | xargs -0 /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-strip --remove-section=.comment --remove-section=.note 2>/dev/null || true find /home/diegotxe/openil/output/target ( -name 'ld-.so' -o -name 'libpthread.so*' ) -print0 | xargs -0 -r /home/diegotxe/openil/output/host/bin/arm-linux-gnueabihf-strip --remove-section=.comment --remove-section=.note --strip-debug 2>/dev/null || true test -f /home/diegotxe/openil/output/target/etc/ld.so.conf && \ { echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true test -d /home/diegotxe/openil/output/target/etc/ld.so.conf.d && \ { echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true mkdir -p /home/diegotxe/openil/output/target/etc ( \ echo "NAME=Buildroot"; \ echo "VERSION=2020.02-g118b7c5-dirty"; \ echo "ID=buildroot"; \ echo "VERSION_ID=2020.02"; \ echo "PRETTY_NAME=\"Buildroot 2020.02\"" \ ) > /home/diegotxe/openil/output/target/usr/lib/os-release ln -sf ../usr/lib/os-release /home/diegotxe/openil/output/target/etc Sanitizing RPATH in target tree PER_PACKAGE_DIR=/home/diegotxe/openil/output/per-package /home/diegotxe/openil/support/scripts/fix-rpath target Sanity check in overlay board/nxp/common/ls/busybox_init_overlay Sanity check in overlay board/nxp/ls1021atsn/rootfs_overlay Copying overlay board/nxp/common/ls/busybox_init_overlay Copying overlay board/nxp/ls1021atsn/rootfs_overlay touch /home/diegotxe/openil/output/target/usr cat /home/diegotxe/openil/output/build/apr-1.7.0/.files-list.txt /home/diegotxe/openil/output/build/apr-util-1.6.1/.files-list.txt /home/diegotxe/openil/output/build/avahi-0.7/.files-list.txt /home/diegotxe/openil/output/build/bash-5.0/.files-list.txt /home/diegotxe/openil/output/build/bash-completion-2.10/.files-list.txt /home/diegotxe/openil/output/build/bc-1.07.1/.files-list.txt /home/diegotxe/openil/output/build/busybox-1.31.1/.files-list.txt /home/diegotxe/openil/output/build/bzip2-1.0.8/.files-list.txt /home/diegotxe/openil/output/build/ca-certificates-20190110/.files-list.txt /home/diegotxe/openil/output/build/cjson-1.7.12/.files-list.txt /home/diegotxe/openil/output/build/cryptodev-linux-a1e738aef6249ee3bddf997e91e59b1210553209/.files-list.txt /home/diegotxe/openil/output/build/cryptodev/.files-list.txt /home/diegotxe/openil/output/build/dbus-1.12.16/.files-list.txt /home/diegotxe/openil/output/build/dbus-glib-0.110/.files-list.txt /home/diegotxe/openil/output/build/dbus-python-1.2.12/.files-list.txt /home/diegotxe/openil/output/build/dbus-triggerd-ba3dbec805cb707c94c54de21666bf18b79bcc09/.files-list.txt /home/diegotxe/openil/output/build/dnsmasq-2.80/.files-list.txt /home/diegotxe/openil/output/build/dropwatch-1.5.1/.files-list.txt /home/diegotxe/openil/output/build/e2fsprogs-1.45.5/.files-list.txt /home/diegotxe/openil/output/build/ethtool-5.4/.files-list.txt /home/diegotxe/openil/output/build/expat-2.2.9/.files-list.txt /home/diegotxe/openil/output/build/flickcurl-1.26/.files-list.txt /home/diegotxe/openil/output/build/genext2fs-1.4.1/.files-list.txt /home/diegotxe/openil/output/build/gnupg-1.4.23/.files-list.txt /home/diegotxe/openil/output/build/gnuplot-5.0.6/.files-list.txt /home/diegotxe/openil/output/build/haveged-1.9.8/.files-list.txt /home/diegotxe/openil/output/build/igh-ethercat-1.5.2/.files-list.txt /home/diegotxe/openil/output/build/iperf-2.0.13/.files-list.txt /home/diegotxe/openil/output/build/iperf3-3.7/.files-list.txt /home/diegotxe/openil/output/build/iproute2-5.5.0/.files-list.txt /home/diegotxe/openil/output/build/iptables-1.8.3/.files-list.txt /home/diegotxe/openil/output/build/iputils-20190709/.files-list.txt /home/diegotxe/openil/output/build/irqbalance-1.6.0/.files-list.txt /home/diegotxe/openil/output/build/jq-a97638713ad30653d424f136018098c4b0e5c71b/.files-list.txt /home/diegotxe/openil/output/build/kmod-26/.files-list.txt /home/diegotxe/openil/output/build/libarchive-3.4.2/.files-list.txt /home/diegotxe/openil/output/build/libassuan-2.5.3/.files-list.txt /home/diegotxe/openil/output/build/libavl-0.3.5/.files-list.txt /home/diegotxe/openil/output/build/libcap-2.27/.files-list.txt /home/diegotxe/openil/output/build/libcgi-1.3.0/.files-list.txt /home/diegotxe/openil/output/build/libcurl-7.68.0/.files-list.txt /home/diegotxe/openil/output/build/libdaemon-0.14/.files-list.txt /home/diegotxe/openil/output/build/libev-4.27/.files-list.txt /home/diegotxe/openil/output/build/libevent-2.1.11/.files-list.txt /home/diegotxe/openil/output/build/libffi-3.3/.files-list.txt /home/diegotxe/openil/output/build/libgcrypt-1.8.5/.files-list.txt /home/diegotxe/openil/output/build/libglib2-2.62.4/.files-list.txt /home/diegotxe/openil/output/build/libgpg-error-1.37/.files-list.txt /home/diegotxe/openil/output/build/libgpgme-1.13.1/.files-list.txt /home/diegotxe/openil/output/build/libmnl-1.0.4/.files-list.txt /home/diegotxe/openil/output/build/libnetconf2-0.12-r2/.files-list.txt /home/diegotxe/openil/output/build/libnfnetlink-1.0.1/.files-list.txt /home/diegotxe/openil/output/build/libnl-3.5.0/.files-list.txt /home/diegotxe/openil/output/build/libopenssl-1.1.1d/.files-list.txt /home/diegotxe/openil/output/build/libpcap-1.9.1/.files-list.txt /home/diegotxe/openil/output/build/libssh2-1.9.0/.files-list.txt /home/diegotxe/openil/output/build/libxml2-2.9.10/.files-list.txt /home/diegotxe/openil/output/build/libxmlrpc-1.43.08/.files-list.txt /home/diegotxe/openil/output/build/libxslt-1.1.34/.files-list.txt /home/diegotxe/openil/output/build/libzlib-1.2.11/.files-list.txt /home/diegotxe/openil/output/build/linux-OpenIL-v1.8-linux-202005/.files-list.txt /home/diegotxe/openil/output/build/mtd-2.1.1/.files-list.txt /home/diegotxe/openil/output/build/nano-4.7/.files-list.txt /home/diegotxe/openil/output/build/ncurses-6.1/.files-list.txt /home/diegotxe/openil/output/build/netperf-2.7.0/.files-list.txt /home/diegotxe/openil/output/build/nss-mdns-0.14.1/.files-list.txt /home/diegotxe/openil/output/build/openssh-8.1p1/.files-list.txt /home/diegotxe/openil/output/build/openssl/.files-list.txt /home/diegotxe/openil/output/build/opkg-0.4.2/.files-list.txt /home/diegotxe/openil/output/build/pcre-8.43/.files-list.txt /home/diegotxe/openil/output/build/perl-5.30.1/.files-list.txt /home/diegotxe/openil/output/build/pinentry-1.1.0/.files-list.txt /home/diegotxe/openil/output/build/pkgconf-1.6.1/.files-list.txt /home/diegotxe/openil/output/build/protobuf-c-1.3.2/.files-list.txt /home/diegotxe/openil/output/build/python-2.7.17/.files-list.txt /home/diegotxe/openil/output/build/python-setuptools-41.4.0/.files-list.txt /home/diegotxe/openil/output/build/qoriq-perl-exporter-tiny-1.000000/.files-list.txt /home/diegotxe/openil/output/build/qoriq-perl-feedgnuplot-v1.45/.files-list.txt /home/diegotxe/openil/output/build/qoriq-perl-list-moreutils-0.426/.files-list.txt /home/diegotxe/openil/output/build/qoriq-prl-0.1/.files-list.txt /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.files-list.txt /home/diegotxe/openil/output/build/qoriq-servo-v1.0/.files-list.txt /home/diegotxe/openil/output/build/qoriq-sysrepo-tsn-v0.2/.files-list.txt /home/diegotxe/openil/output/build/qoriq-tsn-scripts-isochron/.files-list.txt /home/diegotxe/openil/output/build/qoriq-tsntool-OpenIL-v1.8-202005/.files-list.txt /home/diegotxe/openil/output/build/qoriq-yang-model-b1df41d72ecbfb38c13e96eff42d8f027997baed/.files-list.txt /home/diegotxe/openil/output/build/readline-8.0/.files-list.txt /home/diegotxe/openil/output/build/rt-tests-1.6/.files-list.txt /home/diegotxe/openil/output/build/ruby-2.4.9/.files-list.txt /home/diegotxe/openil/output/build/skeleton-init-common/.files-list.txt /home/diegotxe/openil/output/build/skeleton-init-systemd/.files-list.txt /home/diegotxe/openil/output/build/skeleton/.files-list.txt /home/diegotxe/openil/output/build/strace-5.4/.files-list.txt /home/diegotxe/openil/output/build/sysrepo-0.7.8/.files-list.txt /home/diegotxe/openil/output/build/sysstat-11.6.3/.files-list.txt /home/diegotxe/openil/output/build/systemd-244.3/.files-list.txt /home/diegotxe/openil/output/build/tar-1.32/.files-list.txt /home/diegotxe/openil/output/build/tcpdump-4.9.3/.files-list.txt /home/diegotxe/openil/output/build/tmux-2.9a/.files-list.txt /home/diegotxe/openil/output/build/toolchain-external-linaro-arm-2019.12/.files-list.txt /home/diegotxe/openil/output/build/toolchain-external/.files-list.txt /home/diegotxe/openil/output/build/toolchain/.files-list.txt /home/diegotxe/openil/output/build/tzdata-2019c/.files-list.txt /home/diegotxe/openil/output/build/uboot-OpenIL-v1.8-u-boot-202005/.files-list.txt /home/diegotxe/openil/output/build/util-linux-2.35.1/.files-list.txt /home/diegotxe/openil/output/build/wget-1.20.3/.files-list.txt /home/diegotxe/openil/output/build/zip-3.0/.files-list.txt /home/diegotxe/openil/output/build/zlib/.files-list.txt > \ /home/diegotxe/openil/output/build/packages-file-list.txt cat /home/diegotxe/openil/output/build/host-acl-2.2.53/.files-list-host.txt /home/diegotxe/openil/output/build/host-attr-2.4.48/.files-list-host.txt /home/diegotxe/openil/output/build/host-autoconf-2.69/.files-list-host.txt /home/diegotxe/openil/output/build/host-automake-1.15.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-bison-3.4.2/.files-list-host.txt /home/diegotxe/openil/output/build/host-cmake-3.15.5/.files-list-host.txt /home/diegotxe/openil/output/build/host-dbus-1.12.16/.files-list-host.txt /home/diegotxe/openil/output/build/host-dbus-glib-0.110/.files-list-host.txt /home/diegotxe/openil/output/build/host-dosfstools-4.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-dtc-1.5.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-e2fsprogs-1.45.5/.files-list-host.txt /home/diegotxe/openil/output/build/host-expat-2.2.9/.files-list-host.txt /home/diegotxe/openil/output/build/host-fakeroot-1.20.2/.files-list-host.txt /home/diegotxe/openil/output/build/host-flex-2.6.4/.files-list-host.txt /home/diegotxe/openil/output/build/host-genimage-12/.files-list-host.txt /home/diegotxe/openil/output/build/host-gettext-tiny-adaa9c64921e80f2b8dd3610ffb508618b9204f3/.files-list-host.txt /home/diegotxe/openil/output/build/host-gettext/.files-list-host.txt /home/diegotxe/openil/output/build/host-gperf-3.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-intltool-0.51.0/.files-list-host.txt /home/diegotxe/openil/output/build/host-kmod-26/.files-list-host.txt /home/diegotxe/openil/output/build/host-libavl-0.3.5/.files-list-host.txt /home/diegotxe/openil/output/build/host-libcap-2.27/.files-list-host.txt /home/diegotxe/openil/output/build/host-libconfuse-3.2.2/.files-list-host.txt /home/diegotxe/openil/output/build/host-libev-4.27/.files-list-host.txt /home/diegotxe/openil/output/build/host-libffi-3.3/.files-list-host.txt /home/diegotxe/openil/output/build/host-libglib2-2.62.4/.files-list-host.txt /home/diegotxe/openil/output/build/host-libopenssl-1.1.1d/.files-list-host.txt /home/diegotxe/openil/output/build/host-libtool-2.4.6/.files-list-host.txt /home/diegotxe/openil/output/build/host-libxml-parser-perl-2.46/.files-list-host.txt /home/diegotxe/openil/output/build/host-libzlib-1.2.11/.files-list-host.txt /home/diegotxe/openil/output/build/host-lzip-1.20/.files-list-host.txt /home/diegotxe/openil/output/build/host-m4-1.4.18/.files-list-host.txt /home/diegotxe/openil/output/build/host-makedevs/.files-list-host.txt /home/diegotxe/openil/output/build/host-meson-0.53.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-mkpasswd/.files-list-host.txt /home/diegotxe/openil/output/build/host-mtools-4.0.23/.files-list-host.txt /home/diegotxe/openil/output/build/host-ncurses-6.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-ninja-1.10.0/.files-list-host.txt /home/diegotxe/openil/output/build/host-openssl/.files-list-host.txt /home/diegotxe/openil/output/build/host-patchelf-0.9/.files-list-host.txt /home/diegotxe/openil/output/build/host-pcre-8.43/.files-list-host.txt /home/diegotxe/openil/output/build/host-perl-5.30.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-pkgconf-1.6.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-protobuf-3.11.0/.files-list-host.txt /home/diegotxe/openil/output/build/host-protobuf-c-1.3.2/.files-list-host.txt /home/diegotxe/openil/output/build/host-python-2.7.17/.files-list-host.txt /home/diegotxe/openil/output/build/host-python-setuptools-41.4.0/.files-list-host.txt /home/diegotxe/openil/output/build/host-python3-3.8.2/.files-list-host.txt /home/diegotxe/openil/output/build/host-python3-setuptools-41.4.0/.files-list-host.txt /home/diegotxe/openil/output/build/host-ruby-2.4.9/.files-list-host.txt /home/diegotxe/openil/output/build/host-skeleton/.files-list-host.txt /home/diegotxe/openil/output/build/host-sysrepo-0.7.8/.files-list-host.txt /home/diegotxe/openil/output/build/host-systemd-244.3/.files-list-host.txt /home/diegotxe/openil/output/build/host-tzdata-2019c/.files-list-host.txt /home/diegotxe/openil/output/build/host-uboot-tools-2020.01/.files-list-host.txt /home/diegotxe/openil/output/build/host-util-linux-2.35.1/.files-list-host.txt /home/diegotxe/openil/output/build/host-zic-2019c/.files-list-host.txt /home/diegotxe/openil/output/build/host-zlib/.files-list-host.txt > \ /home/diegotxe/openil/output/build/packages-file-list-host.txt cat /home/diegotxe/openil/output/build/apr-1.7.0/.files-list-staging.txt /home/diegotxe/openil/output/build/apr-util-1.6.1/.files-list-staging.txt /home/diegotxe/openil/output/build/avahi-0.7/.files-list-staging.txt /home/diegotxe/openil/output/build/bash-completion-2.10/.files-list-staging.txt /home/diegotxe/openil/output/build/bzip2-1.0.8/.files-list-staging.txt /home/diegotxe/openil/output/build/cjson-1.7.12/.files-list-staging.txt /home/diegotxe/openil/output/build/cryptodev-linux-a1e738aef6249ee3bddf997e91e59b1210553209/.files-list-staging.txt /home/diegotxe/openil/output/build/dbus-1.12.16/.files-list-staging.txt /home/diegotxe/openil/output/build/dbus-glib-0.110/.files-list-staging.txt /home/diegotxe/openil/output/build/dbus-python-1.2.12/.files-list-staging.txt /home/diegotxe/openil/output/build/e2fsprogs-1.45.5/.files-list-staging.txt /home/diegotxe/openil/output/build/expat-2.2.9/.files-list-staging.txt /home/diegotxe/openil/output/build/flickcurl-1.26/.files-list-staging.txt /home/diegotxe/openil/output/build/igh-ethercat-1.5.2/.files-list-staging.txt /home/diegotxe/openil/output/build/iptables-1.8.3/.files-list-staging.txt /home/diegotxe/openil/output/build/jq-a97638713ad30653d424f136018098c4b0e5c71b/.files-list-staging.txt /home/diegotxe/openil/output/build/kmod-26/.files-list-staging.txt /home/diegotxe/openil/output/build/libarchive-3.4.2/.files-list-staging.txt /home/diegotxe/openil/output/build/libassuan-2.5.3/.files-list-staging.txt /home/diegotxe/openil/output/build/libavl-0.3.5/.files-list-staging.txt /home/diegotxe/openil/output/build/libcap-2.27/.files-list-staging.txt /home/diegotxe/openil/output/build/libcgi-1.3.0/.files-list-staging.txt /home/diegotxe/openil/output/build/libcurl-7.68.0/.files-list-staging.txt /home/diegotxe/openil/output/build/libdaemon-0.14/.files-list-staging.txt /home/diegotxe/openil/output/build/libev-4.27/.files-list-staging.txt /home/diegotxe/openil/output/build/libevent-2.1.11/.files-list-staging.txt /home/diegotxe/openil/output/build/libffi-3.3/.files-list-staging.txt /home/diegotxe/openil/output/build/libgcrypt-1.8.5/.files-list-staging.txt /home/diegotxe/openil/output/build/libglib2-2.62.4/.files-list-staging.txt /home/diegotxe/openil/output/build/libgpg-error-1.37/.files-list-staging.txt /home/diegotxe/openil/output/build/libgpgme-1.13.1/.files-list-staging.txt /home/diegotxe/openil/output/build/libmnl-1.0.4/.files-list-staging.txt /home/diegotxe/openil/output/build/libnetconf2-0.12-r2/.files-list-staging.txt /home/diegotxe/openil/output/build/libnfnetlink-1.0.1/.files-list-staging.txt /home/diegotxe/openil/output/build/libnl-3.5.0/.files-list-staging.txt /home/diegotxe/openil/output/build/libopenssl-1.1.1d/.files-list-staging.txt /home/diegotxe/openil/output/build/libpcap-1.9.1/.files-list-staging.txt /home/diegotxe/openil/output/build/libssh2-1.9.0/.files-list-staging.txt /home/diegotxe/openil/output/build/libxml2-2.9.10/.files-list-staging.txt /home/diegotxe/openil/output/build/libxmlrpc-1.43.08/.files-list-staging.txt /home/diegotxe/openil/output/build/libxslt-1.1.34/.files-list-staging.txt /home/diegotxe/openil/output/build/libzlib-1.2.11/.files-list-staging.txt /home/diegotxe/openil/output/build/mtd-2.1.1/.files-list-staging.txt /home/diegotxe/openil/output/build/ncurses-6.1/.files-list-staging.txt /home/diegotxe/openil/output/build/opkg-0.4.2/.files-list-staging.txt /home/diegotxe/openil/output/build/pcre-8.43/.files-list-staging.txt /home/diegotxe/openil/output/build/perl-5.30.1/.files-list-staging.txt /home/diegotxe/openil/output/build/protobuf-c-1.3.2/.files-list-staging.txt /home/diegotxe/openil/output/build/python-2.7.17/.files-list-staging.txt /home/diegotxe/openil/output/build/qoriq-servo-v1.0/.files-list-staging.txt /home/diegotxe/openil/output/build/qoriq-tsntool-OpenIL-v1.8-202005/.files-list-staging.txt /home/diegotxe/openil/output/build/readline-8.0/.files-list-staging.txt /home/diegotxe/openil/output/build/skeleton-init-common/.files-list-staging.txt /home/diegotxe/openil/output/build/sysrepo-0.7.8/.files-list-staging.txt /home/diegotxe/openil/output/build/systemd-244.3/.files-list-staging.txt /home/diegotxe/openil/output/build/toolchain-external-linaro-arm-2019.12/.files-list-staging.txt /home/diegotxe/openil/output/build/toolchain/.files-list-staging.txt /home/diegotxe/openil/output/build/util-linux-2.35.1/.files-list-staging.txt > \ /home/diegotxe/openil/output/build/packages-file-list-staging.txt Generating root filesystems common tables rm -rf /home/diegotxe/openil/output/build/buildroot-fs mkdir -p /home/diegotxe/openil/output/build/buildroot-fs printf ' avahi -1 avahi -1 - - -\n dbus -1 dbus -1 /var/run/dbus - dbus DBus messagebus user\n sshd -1 sshd -1 /var/empty - - SSH drop priv user\n - - input -1 - - - Input device group\n - - systemd-journal -1 - - - Journal\n - - render -1 - - - DRI rendering nodes\n - - kvm -1 - - - kvm nodes\n systemd-bus-proxy -1 systemd-bus-proxy -1 - - - Proxy D-Bus messages to/from a bus\n systemd-journal-gateway -1 systemd-journal-gateway -1 /var/log/journal - - Journal Gateway\n systemd-journal-remote -1 systemd-journal-remote -1 /var/log/journal/remote - - Journal Remote\n systemd-journal-upload -1 systemd-journal-upload -1 - - - Journal Upload\n \n systemd-network -1 systemd-network -1 - - - Network Manager\n systemd-resolve -1 systemd-resolve -1 - - - Network Name Resolution Manager\n systemd-timesync -1 systemd-timesync -1 - - - Network Time Synchronization\n\n' >> /home/diegotxe/openil/output/build/buildroot-fs/full_users_table.txt printf ' /bin/busybox f 4755 0 0 - - - - -\n /usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - -\n /usr/sbin/arping f 755 0 0 - - - - -\n /usr/bin/clockdiff f 4755 0 0 - - - - -\n /bin/ping f 4755 0 0 - - - - -\n /usr/bin/traceroute6 f 4755 0 0 - - - - -\n /var/empty d 755 root root - - - - -\n\n' > /home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt cat system/device_table.txt >> /home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt Generating filesystem image rootfs.ext2 mkdir -p /home/diegotxe/openil/output/images rm -rf /home/diegotxe/openil/output/build/buildroot-fs/ext2 mkdir -p /home/diegotxe/openil/output/build/buildroot-fs/ext2 rsync -auH --exclude=/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM /home/diegotxe/openil/output/target/ /home/diegotxe/openil/output/build/buildroot-fs/ext2/target echo '#!/bin/sh' > /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot echo "set -e" >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot echo "chown -h -R 0:0 /home/diegotxe/openil/output/build/buildroot-fs/ext2/target" >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /home/diegotxe/openil/support/scripts/mkusers /home/diegotxe/openil/output/build/buildroot-fs/full_users_table.txt /home/diegotxe/openil/output/build/buildroot-fs/ext2/target >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot echo "/home/diegotxe/openil/output/host/bin/makedevs -d /home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt /home/diegotxe/openil/output/build/buildroot-fs/ext2/target" >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot printf ' rm -rf /home/diegotxe/openil/output/build/buildroot-fs/ext2/target//usr/lib/udev/hwdb.d/\n' >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot printf ' \n' >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot printf ' rm -f /home/diegotxe/openil/output/images/rootfs.ext2\n /home/diegotxe/openil/output/host/sbin/mkfs.ext4 -d /home/diegotxe/openil/output/build/buildroot-fs/ext2/target -r 1 -N 0 -m 5 -L "" -O ^64bit /home/diegotxe/openil/output/images/rootfs.ext2 "512M" || { ret=$?; echo "*** Maybe you need to increase the filesystem size (BR2_TARGET_ROOTFS_EXT2_SIZE)" 1>&2; exit $ret; }\n' >> /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot chmod a+x /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" FAKEROOTDONTTRYCHOWN=1 /home/diegotxe/openil/output/host/bin/fakeroot -- /home/diegotxe/openil/output/build/buildroot-fs/ext2/fakeroot rootdir=/home/diegotxe/openil/output/build/buildroot-fs/ext2/target table='/home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt' mke2fs 1.45.5 (07-Jan-2020) Creating regular file /home/diegotxe/openil/output/images/rootfs.ext2 64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify. Creating filesystem with 131072 4k blocks and 32768 inodes Filesystem UUID: d52553ff-eaa0-4305-b0c9-429bf2bbda74 Superblock backups stored on blocks: 32768, 98304

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done Copying files into the device: done Writing superblocks and filesystem accounting information: done

ln -sf rootfs.ext2 /home/diegotxe/openil/output/images/rootfs.ext4

Generating filesystem image rootfs.tar mkdir -p /home/diegotxe/openil/output/images rm -rf /home/diegotxe/openil/output/build/buildroot-fs/tar mkdir -p /home/diegotxe/openil/output/build/buildroot-fs/tar rsync -auH --exclude=/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM /home/diegotxe/openil/output/target/ /home/diegotxe/openil/output/build/buildroot-fs/tar/target echo '#!/bin/sh' > /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot echo "set -e" >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot echo "chown -h -R 0:0 /home/diegotxe/openil/output/build/buildroot-fs/tar/target" >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /home/diegotxe/openil/support/scripts/mkusers /home/diegotxe/openil/output/build/buildroot-fs/full_users_table.txt /home/diegotxe/openil/output/build/buildroot-fs/tar/target >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot echo "/home/diegotxe/openil/output/host/bin/makedevs -d /home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt /home/diegotxe/openil/output/build/buildroot-fs/tar/target" >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot printf ' rm -rf /home/diegotxe/openil/output/build/buildroot-fs/tar/target//usr/lib/udev/hwdb.d/\n' >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot printf ' \n' >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot printf ' (cd /home/diegotxe/openil/output/build/buildroot-fs/tar/target; find -print0 | LC_ALL=C sort -z | tar --pax-option=exthdr.name=%%d/PaxHeaders/%%f,atime:=0,ctime:=0 -cf /home/diegotxe/openil/output/images/rootfs.tar --null --xattrs-include='\''*'\'' --no-recursion -T - --numeric-owner)\n' >> /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot chmod a+x /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot PATH="/home/diegotxe/openil/output/host/bin:/home/diegotxe/openil/output/host/sbin:/home/diegotxe/bin:/home/diegotxe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" FAKEROOTDONTTRYCHOWN=1 /home/diegotxe/openil/output/host/bin/fakeroot -- /home/diegotxe/openil/output/build/buildroot-fs/tar/fakeroot rootdir=/home/diegotxe/openil/output/build/buildroot-fs/tar/target table='/home/diegotxe/openil/output/build/buildroot-fs/full_devices_table.txt' ln -snf /home/diegotxe/openil/output/host/arm-buildroot-linux-gnueabihf/sysroot /home/diegotxe/openil/output/staging Executing post-image script board/nxp/ls1021atsn/post-image.sh

INFO: cmd: "mkdir -p "/home/diegotxe/openil/output/build/genimage.tmp"" (stderr): INFO: cmd: "rm -rf "/home/diegotxe/openil/output/build/genimage.tmp"/*" (stderr): INFO: cmd: "mkdir -p "/home/diegotxe/openil/output/build/genimage.tmp"" (stderr): INFO: cmd: "cp -a "/home/diegotxe/openil/output/target" "/home/diegotxe/openil/output/build/genimage.tmp/root"" (stderr): INFO: cmd: "find '/home/diegotxe/openil/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/home/diegotxe/openil/output/target/{}' '/home/diegotxe/openil/output/build/genimage.tmp/root/{}'" (stderr): INFO: cmd: "mkdir -p "/home/diegotxe/openil/output/images"" (stderr): INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/diegotxe/openil/output/images/boot.vfat" seek=268435456 count=0 bs=1 2>/dev/null" (stderr): INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/diegotxe/openil/output/images/boot.vfat'" (stderr): INFO: vfat(boot.vfat): adding file 'ls1021a-tsn.dtb' as 'ls1021a-tsn.dtb' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/diegotxe/openil/output/images/boot.vfat' '/home/diegotxe/openil/output/images/ls1021a-tsn.dtb' '::'" (stderr): INFO: vfat(boot.vfat): adding file 'uImage' as 'uImage' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/diegotxe/openil/output/images/boot.vfat' '/home/diegotxe/openil/output/images/uImage' '::'" (stderr): INFO: hdimage(sdcard.img): adding partition 'u-boot' from 'u-boot-with-spl-pbl.bin' ... INFO: hdimage(sdcard.img): adding partition 'u-boot-environment' from 'uboot-env.bin' ... INFO: hdimage(sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat' ... INFO: hdimage(sdcard.img): adding partition 'rootfs' (in MBR) from 'rootfs.ext2' ... INFO: hdimage(sdcard.img): writing MBR

vladimiroltean commented 4 years ago

The build log looks fine. Dumb question: what does ls -la /usr/sbin/phc2sys show on the board? Is it a recent timestamp (corresponding to a recently rebuilt binary) or an old timestamp?

diegotxegp commented 4 years ago

Dumb question: what does ls -la /usr/sbin/phc2sys show on the board?

nodo2@nodo2-N-A:~$ ls -la /usr/sbin/phc2sys ls: cannot access '/usr/sbin/phc2sys': No such file or directory

Is it a recent timestamp (corresponding to a recently rebuilt binary) or an old timestamp?

If you are talking to me if my SD card image is recent, yes. I compiled the 1.8 OpenIL version.

vladimiroltean commented 4 years ago

nodo2@nodo2-N-A:~$ ls -la /usr/sbin/phc2sys ls: cannot access '/usr/sbin/phc2sys': No such file or directory

Why are you giving me this, I don't care about phc2sys about the Intel PC, I care about phc2sys on the OpenIL board. The point was to check if this binary got updated after rebuild or not.

diegotxegp commented 4 years ago

Oh yes, yes. I was wrong.

[root@LS1021ATSN ~] # ls -la /usr/sbin/phc2sys -rwxr-xr-x 1 root root 119368 Jun 22 2020 /usr/sbin/phc2sys

vladimiroltean commented 4 years ago

Will come back to you a little bit later (a few hours or so).

diegotxegp commented 4 years ago

OK. Thank you

diegotxegp commented 4 years ago

Assuming you have phc2sys and ptp4l on all nodes, the propagation chain of the time is like this: Master's CLOCK_REALTIME -> master's PHC (/dev/ptp0 or similar) -> slave's PHC -> slave's CLOCK_REALTIME. So, if one of your nodes has a CLOCK_REALTIME is in 1970, it means one of 2 things:

* You are not synchronizing its CLOCK_REALTIME to the PHC, or

* The PHC is in 1970.

If the PHC is in 1970, it means one of 2 things:

* You are not synchronizing it to the master using ptp4l

* The master is in 1970.

I hope you can see where this is going. So the clock propagation tree is interrupted somewhere.

I saw my error. I was not taking time from CLOCK_REALTIME from master with phc2sys. That is why I got a time in 1970 in the slave, because the PHC was in 1970 after reboot.

Apart from that, CLOCK_REALTIME was on February 7th 2020 after reboot. I thought that both CLOCK_REALTIME and PHC come back to 1970 after every reboot. Not only reboot. Even I unplugged the platform from energy. It seemed to me curious.

A second question is: How can I keep a new IP address at br0 at the platform? I prefer connecting to the LS1021ATSN platform via SSH, but initially br0 IP address is empty. So, I connect first via PuTTy for changing br0 to an IP address and then I can connect via SSH.

And also I would want to ask you about if you could see something to fix those big offsets on phc2sys.

Thank you very much, Vladimir, for your help. I appreciate it.

Diego

vladimiroltean commented 4 years ago

I honestly don't know why the patch worked for me, because it wasn't supposed to work.... So currently linuxptp searching for compiled kernel headers is a bit of a mess, please try this patch instead:

From 2686f1a2d773af778cd9fe90b149441aaf8f8db8 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.com>
Date: Tue, 23 Jun 2020 12:14:52 +0300
Subject: [PATCH RFC] phc2sys: provide missing kernel headers for sysoff
 functionality

Currently it is very finicky to deploy linuxptp in an automated build
system and make KBUILD_OUTPUT pick up the output of "make
headers_install" in order for the application to make full use of the
features exposed by the runtime kernel. And the toolchain/libc will
almost certainly never contain recent enough kernel headers to be of any
use here. And there's no good reason for that: the application can probe
at runtime for the sysoff methods supported by the kernel anyway.

So let's provide the kernel definitions for sysoff, sysoff_precise and
sysoff_extended, such that SYSOFF_COMPILE_TIME_MISSING is not something
that will bother us any longer.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 missing.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 sysoff.c  | 27 +--------------------------
 sysoff.h  |  2 +-
 3 files changed, 50 insertions(+), 27 deletions(-)

diff --git a/missing.h b/missing.h
index bc708cbbbe8a..c77d381e76b4 100644
--- a/missing.h
+++ b/missing.h
@@ -97,6 +97,54 @@ struct compat_ptp_clock_caps {

 #endif /*LINUX_VERSION_CODE < 5.8*/

+#ifndef PTP_SYS_OFFSET
+
+#define PTP_SYS_OFFSET     _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
+
+struct ptp_sys_offset {
+   unsigned int n_samples; /* Desired number of measurements. */
+   unsigned int rsv[3];    /* Reserved for future use. */
+   /*
+    * Array of interleaved system/phc time stamps. The kernel
+    * will provide 2*n_samples + 1 time stamps, with the last
+    * one as a system time stamp.
+    */
+   struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
+};
+
+#endif /* PTP_SYS_OFFSET */
+
+#ifndef PTP_SYS_OFFSET_PRECISE
+
+#define PTP_SYS_OFFSET_PRECISE \
+   _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise)
+
+struct ptp_sys_offset_precise {
+   struct ptp_clock_time device;
+   struct ptp_clock_time sys_realtime;
+   struct ptp_clock_time sys_monoraw;
+   unsigned int rsv[4];    /* Reserved for future use. */
+};
+
+#endif /* PTP_SYS_OFFSET_PRECISE */
+
+#ifndef PTP_SYS_OFFSET_EXTENDED
+
+#define PTP_SYS_OFFSET_EXTENDED \
+   _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended)
+
+struct ptp_sys_offset_extended {
+   unsigned int n_samples; /* Desired number of measurements. */
+   unsigned int rsv[3];    /* Reserved for future use. */
+   /*
+    * Array of [system, phc, system] time stamps. The kernel will provide
+    * 3*n_samples time stamps.
+    */
+   struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
+};
+
+#endif /* PTP_SYS_OFFSET_EXTENDED */
+
 #ifndef PTP_PIN_SETFUNC

 enum ptp_pin_function {
diff --git a/sysoff.c b/sysoff.c
index 05d2ed617780..03cdb87dcab2 100644
--- a/sysoff.c
+++ b/sysoff.c
@@ -27,8 +27,6 @@

 #define NS_PER_SEC 1000000000LL

-#ifdef PTP_SYS_OFFSET
-
 static int64_t pctns(struct ptp_clock_time *t)
 {
    return t->sec * NS_PER_SEC + t->nsec;
@@ -42,7 +40,6 @@ static struct {

 static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
 {
-#ifdef PTP_SYS_OFFSET_PRECISE
    struct ptp_sys_offset_precise pso;
    memset(&pso, 0, sizeof(pso));
    if (ioctl(fd, PTP_SYS_OFFSET_PRECISE, &pso)) {
@@ -52,9 +49,6 @@ static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
    *result = pctns(&pso.sys_realtime) - pctns(&pso.device);
    *ts = pctns(&pso.sys_realtime);
    return SYSOFF_PRECISE;
-#else
-   return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static void insertion_sort(int length, int64_t interval, int64_t offset, uint64_t ts)
@@ -100,7 +94,6 @@ static int64_t sysoff_estimate(struct ptp_clock_time *pct, int extended,
 static int sysoff_extended(int fd, int n_samples,
               int64_t *result, uint64_t *ts, int64_t *delay)
 {
-#ifdef PTP_SYS_OFFSET_EXTENDED
    struct ptp_sys_offset_extended pso;
    memset(&pso, 0, sizeof(pso));
    pso.n_samples = n_samples;
@@ -110,9 +103,6 @@ static int sysoff_extended(int fd, int n_samples,
    }
    *result = sysoff_estimate(&pso.ts[0][0], 1, n_samples, ts, delay);
    return SYSOFF_EXTENDED;
-#else
-   return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static int sysoff_basic(int fd, int n_samples,
@@ -141,7 +131,7 @@ int sysoff_measure(int fd, int method, int n_samples,
    case SYSOFF_BASIC:
        return sysoff_basic(fd, n_samples, result, ts, delay);
    }
-   return SYSOFF_COMPILE_TIME_MISSING;
+   return SYSOFF_RUN_TIME_MISSING;
 }

 int sysoff_probe(int fd, int n_samples)
@@ -165,18 +155,3 @@ int sysoff_probe(int fd, int n_samples)

    return SYSOFF_RUN_TIME_MISSING;
 }
-
-#else /* !PTP_SYS_OFFSET */
-
-int sysoff_measure(int fd, int method, int n_samples,
-          int64_t *result, uint64_t *ts, int64_t *delay)
-{
-   return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-int sysoff_probe(int fd, int n_samples)
-{
-   return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-#endif /* PTP_SYS_OFFSET */
diff --git a/sysoff.h b/sysoff.h
index 79d22908ce48..e4de91948231 100644
--- a/sysoff.h
+++ b/sysoff.h
@@ -19,9 +19,9 @@
  */

 #include <stdint.h>
+#include "missing.h"

 enum {
-   SYSOFF_COMPILE_TIME_MISSING = -2,
    SYSOFF_RUN_TIME_MISSING = -1,
    SYSOFF_PRECISE,
    SYSOFF_EXTENDED,
-- 
2.25.1

Save it in package/nxp/qoriq-ptp4l/0001-phc2sys-provide-missing-kernel-headers-for-sysoff-fu.patch and then rebuild using the same make qoriq-ptp4l-dirclean world command as before. Thanks, -Vladimir

vladimiroltean commented 4 years ago

A second question is: How can I keep a new IP address at br0 at the platform? I prefer connecting to the LS1021ATSN platform via SSH, but initially br0 IP address is empty. So, I connect first via PuTTy for changing br0 to an IP address and then I can connect via SSH.

In /etc/systemd/network/br0.network on the LS1021A-TSN board, you can see that it has this content:

DHCP=ipv4

So it gets an IP over DHCP. You have 2 options:

diegotxegp commented 4 years ago

I honestly don't know why the patch worked for me, because it wasn't supposed to work.... So currently linuxptp searching for compiled kernel headers is a bit of a mess, please try this patch instead:

From 2686f1a2d773af778cd9fe90b149441aaf8f8db8 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.com>
Date: Tue, 23 Jun 2020 12:14:52 +0300
Subject: [PATCH RFC] phc2sys: provide missing kernel headers for sysoff
 functionality

Currently it is very finicky to deploy linuxptp in an automated build
system and make KBUILD_OUTPUT pick up the output of "make
headers_install" in order for the application to make full use of the
features exposed by the runtime kernel. And the toolchain/libc will
almost certainly never contain recent enough kernel headers to be of any
use here. And there's no good reason for that: the application can probe
at runtime for the sysoff methods supported by the kernel anyway.

So let's provide the kernel definitions for sysoff, sysoff_precise and
sysoff_extended, such that SYSOFF_COMPILE_TIME_MISSING is not something
that will bother us any longer.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 missing.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 sysoff.c  | 27 +--------------------------
 sysoff.h  |  2 +-
 3 files changed, 50 insertions(+), 27 deletions(-)

diff --git a/missing.h b/missing.h
index bc708cbbbe8a..c77d381e76b4 100644
--- a/missing.h
+++ b/missing.h
@@ -97,6 +97,54 @@ struct compat_ptp_clock_caps {

 #endif /*LINUX_VERSION_CODE < 5.8*/

+#ifndef PTP_SYS_OFFSET
+
+#define PTP_SYS_OFFSET     _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
+
+struct ptp_sys_offset {
+ unsigned int n_samples; /* Desired number of measurements. */
+ unsigned int rsv[3];    /* Reserved for future use. */
+ /*
+  * Array of interleaved system/phc time stamps. The kernel
+  * will provide 2*n_samples + 1 time stamps, with the last
+  * one as a system time stamp.
+  */
+ struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
+};
+
+#endif /* PTP_SYS_OFFSET */
+
+#ifndef PTP_SYS_OFFSET_PRECISE
+
+#define PTP_SYS_OFFSET_PRECISE \
+ _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise)
+
+struct ptp_sys_offset_precise {
+ struct ptp_clock_time device;
+ struct ptp_clock_time sys_realtime;
+ struct ptp_clock_time sys_monoraw;
+ unsigned int rsv[4];    /* Reserved for future use. */
+};
+
+#endif /* PTP_SYS_OFFSET_PRECISE */
+
+#ifndef PTP_SYS_OFFSET_EXTENDED
+
+#define PTP_SYS_OFFSET_EXTENDED \
+ _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended)
+
+struct ptp_sys_offset_extended {
+ unsigned int n_samples; /* Desired number of measurements. */
+ unsigned int rsv[3];    /* Reserved for future use. */
+ /*
+  * Array of [system, phc, system] time stamps. The kernel will provide
+  * 3*n_samples time stamps.
+  */
+ struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
+};
+
+#endif /* PTP_SYS_OFFSET_EXTENDED */
+
 #ifndef PTP_PIN_SETFUNC

 enum ptp_pin_function {
diff --git a/sysoff.c b/sysoff.c
index 05d2ed617780..03cdb87dcab2 100644
--- a/sysoff.c
+++ b/sysoff.c
@@ -27,8 +27,6 @@

 #define NS_PER_SEC 1000000000LL

-#ifdef PTP_SYS_OFFSET
-
 static int64_t pctns(struct ptp_clock_time *t)
 {
  return t->sec * NS_PER_SEC + t->nsec;
@@ -42,7 +40,6 @@ static struct {

 static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
 {
-#ifdef PTP_SYS_OFFSET_PRECISE
  struct ptp_sys_offset_precise pso;
  memset(&pso, 0, sizeof(pso));
  if (ioctl(fd, PTP_SYS_OFFSET_PRECISE, &pso)) {
@@ -52,9 +49,6 @@ static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
  *result = pctns(&pso.sys_realtime) - pctns(&pso.device);
  *ts = pctns(&pso.sys_realtime);
  return SYSOFF_PRECISE;
-#else
- return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static void insertion_sort(int length, int64_t interval, int64_t offset, uint64_t ts)
@@ -100,7 +94,6 @@ static int64_t sysoff_estimate(struct ptp_clock_time *pct, int extended,
 static int sysoff_extended(int fd, int n_samples,
             int64_t *result, uint64_t *ts, int64_t *delay)
 {
-#ifdef PTP_SYS_OFFSET_EXTENDED
  struct ptp_sys_offset_extended pso;
  memset(&pso, 0, sizeof(pso));
  pso.n_samples = n_samples;
@@ -110,9 +103,6 @@ static int sysoff_extended(int fd, int n_samples,
  }
  *result = sysoff_estimate(&pso.ts[0][0], 1, n_samples, ts, delay);
  return SYSOFF_EXTENDED;
-#else
- return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static int sysoff_basic(int fd, int n_samples,
@@ -141,7 +131,7 @@ int sysoff_measure(int fd, int method, int n_samples,
  case SYSOFF_BASIC:
      return sysoff_basic(fd, n_samples, result, ts, delay);
  }
- return SYSOFF_COMPILE_TIME_MISSING;
+ return SYSOFF_RUN_TIME_MISSING;
 }

 int sysoff_probe(int fd, int n_samples)
@@ -165,18 +155,3 @@ int sysoff_probe(int fd, int n_samples)

  return SYSOFF_RUN_TIME_MISSING;
 }
-
-#else /* !PTP_SYS_OFFSET */
-
-int sysoff_measure(int fd, int method, int n_samples,
-        int64_t *result, uint64_t *ts, int64_t *delay)
-{
- return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-int sysoff_probe(int fd, int n_samples)
-{
- return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-#endif /* PTP_SYS_OFFSET */
diff --git a/sysoff.h b/sysoff.h
index 79d22908ce48..e4de91948231 100644
--- a/sysoff.h
+++ b/sysoff.h
@@ -19,9 +19,9 @@
  */

 #include <stdint.h>
+#include "missing.h"

 enum {
- SYSOFF_COMPILE_TIME_MISSING = -2,
  SYSOFF_RUN_TIME_MISSING = -1,
  SYSOFF_PRECISE,
  SYSOFF_EXTENDED,
-- 
2.25.1

Save it in package/nxp/qoriq-ptp4l/0001-phc2sys-provide-missing-kernel-headers-for-sysoff-fu.patch and then rebuild using the same make qoriq-ptp4l-dirclean world command as before. Thanks, -Vladimir

After copying the file in /openil/package/nxp /qoriq-ptp4l, git apply /openil/package/nxp /qoriq-ptp4l/0001-phc2sys-provide-missing-kernel-headers-for-sysoff-fu.patch (I was not allowed "git am"), make nxp_ls1021atsn_defconfig, make qoriq-ptp4l-dirclean world, I get this error message:

`~/openil$ make qoriq-ptp4l-dirclean world rm -Rf /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d /usr/bin/make -j1 O=/home/diegotxe/openil/output HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" syncconfig WARNING: no hash file for qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz

qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Extracting gzip -d -c /home/diegotxe/openil/dl/qoriq-ptp4l/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz | tar --strip-components=1 -C /home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d -xf - qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Patching

Applying 0001-Remove-the-unfinished-SNMP-code.patch using patch: patching file makefile patching file snmp4lptp.8 patching file snmp4lptp.c patching file snmp4lptp_mib.h patching file snmpflg.sh

Applying 0001-phc2sys-provide-missing-kernel-headers-for-sysoff-fu.patch using patch: patching file missing.h Hunk #1 FAILED at 97. 1 out of 1 hunk FAILED -- saving rejects to file missing.h.rej patching file sysoff.c Hunk #7 FAILED at 155. 1 out of 7 hunks FAILED -- saving rejects to file sysoff.c.rej patching file sysoff.h package/pkg-generic.mk:228: fallo en las instrucciones para el objetivo '/home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_patched' make[1]: [/home/diegotxe/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_patched] Error 1 Makefile:84: fallo en las instrucciones para el objetivo '_all' make: [_all] Error 2`

vladimiroltean commented 4 years ago

Yes, sorry, I had made the patch against mainline linuxptp and not against the OpenIL version, here it is again:

From 9338815d09ce73aa8d038682fd5e218c9b9bde84 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.com>
Date: Tue, 23 Jun 2020 12:14:52 +0300
Subject: [PATCH OpenIL] phc2sys: provide missing kernel headers for sysoff
 functionality

Currently it is very finicky to deploy linuxptp in an automated build
system and make KBUILD_OUTPUT pick up the output of "make
headers_install" in order for the application to make full use of the
features exposed by the runtime kernel. And the toolchain/libc will
almost certainly never contain recent enough kernel headers to be of any
use here. And there's no good reason for that: the application can probe
at runtime for the sysoff methods supported by the kernel anyway.

So let's provide the kernel definitions for sysoff, sysoff_precise and
sysoff_extended, such that SYSOFF_COMPILE_TIME_MISSING is not something
that will bother us any longer.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 missing.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 sysoff.c  | 27 +--------------------------
 sysoff.h  |  2 +-
 3 files changed, 53 insertions(+), 28 deletions(-)

diff --git a/missing.h b/missing.h
index 8f92079d4b3c..49f390bdf6a0 100644
--- a/missing.h
+++ b/missing.h
@@ -23,9 +23,11 @@
 #ifndef HAVE_MISSING_H
 #define HAVE_MISSING_H

-#include <time.h>
+#include <linux/ptp_clock.h>
+#include <linux/version.h>
 #include <sys/syscall.h>
 #include <sys/timex.h>
+#include <time.h>
 #include <unistd.h>

 #ifndef ADJ_TAI
@@ -60,6 +62,54 @@ enum {
 };
 #endif

+#ifndef PTP_SYS_OFFSET
+
+#define PTP_SYS_OFFSET     _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
+
+struct ptp_sys_offset {
+   unsigned int n_samples; /* Desired number of measurements. */
+   unsigned int rsv[3];    /* Reserved for future use. */
+   /*
+    * Array of interleaved system/phc time stamps. The kernel
+    * will provide 2*n_samples + 1 time stamps, with the last
+    * one as a system time stamp.
+    */
+   struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
+};
+
+#endif /* PTP_SYS_OFFSET */
+
+#ifndef PTP_SYS_OFFSET_PRECISE
+
+#define PTP_SYS_OFFSET_PRECISE \
+   _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise)
+
+struct ptp_sys_offset_precise {
+   struct ptp_clock_time device;
+   struct ptp_clock_time sys_realtime;
+   struct ptp_clock_time sys_monoraw;
+   unsigned int rsv[4];    /* Reserved for future use. */
+};
+
+#endif /* PTP_SYS_OFFSET_PRECISE */
+
+#ifndef PTP_SYS_OFFSET_EXTENDED
+
+#define PTP_SYS_OFFSET_EXTENDED \
+   _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended)
+
+struct ptp_sys_offset_extended {
+   unsigned int n_samples; /* Desired number of measurements. */
+   unsigned int rsv[3];    /* Reserved for future use. */
+   /*
+    * Array of [system, phc, system] time stamps. The kernel will provide
+    * 3*n_samples time stamps.
+    */
+   struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
+};
+
+#endif /* PTP_SYS_OFFSET_EXTENDED */
+
 #ifndef LIST_FOREACH_SAFE
 #define    LIST_FOREACH_SAFE(var, head, field, tvar)           \
    for ((var) = LIST_FIRST((head));                \
diff --git a/sysoff.c b/sysoff.c
index b993ee98bb41..03cdb87dcab2 100644
--- a/sysoff.c
+++ b/sysoff.c
@@ -27,8 +27,6 @@

 #define NS_PER_SEC 1000000000LL

-#ifdef PTP_SYS_OFFSET
-
 static int64_t pctns(struct ptp_clock_time *t)
 {
    return t->sec * NS_PER_SEC + t->nsec;
@@ -42,7 +40,6 @@ static struct {

 static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
 {
-#ifdef PTP_SYS_OFFSET_PRECISE
    struct ptp_sys_offset_precise pso;
    memset(&pso, 0, sizeof(pso));
    if (ioctl(fd, PTP_SYS_OFFSET_PRECISE, &pso)) {
@@ -52,9 +49,6 @@ static int sysoff_precise(int fd, int64_t *result, uint64_t *ts)
    *result = pctns(&pso.sys_realtime) - pctns(&pso.device);
    *ts = pctns(&pso.sys_realtime);
    return SYSOFF_PRECISE;
-#else
-   return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static void insertion_sort(int length, int64_t interval, int64_t offset, uint64_t ts)
@@ -100,7 +94,6 @@ static int64_t sysoff_estimate(struct ptp_clock_time *pct, int extended,
 static int sysoff_extended(int fd, int n_samples,
               int64_t *result, uint64_t *ts, int64_t *delay)
 {
-#ifdef PTP_SYS_OFFSET_EXTENDED
    struct ptp_sys_offset_extended pso;
    memset(&pso, 0, sizeof(pso));
    pso.n_samples = n_samples;
@@ -110,9 +103,6 @@ static int sysoff_extended(int fd, int n_samples,
    }
    *result = sysoff_estimate(&pso.ts[0][0], 1, n_samples, ts, delay);
    return SYSOFF_EXTENDED;
-#else
-   return SYSOFF_COMPILE_TIME_MISSING;
-#endif
 }

 static int sysoff_basic(int fd, int n_samples,
@@ -141,7 +131,7 @@ int sysoff_measure(int fd, int method, int n_samples,
    case SYSOFF_BASIC:
        return sysoff_basic(fd, n_samples, result, ts, delay);
    }
-   return SYSOFF_COMPILE_TIME_MISSING;
+   return SYSOFF_RUN_TIME_MISSING;
 }

 int sysoff_probe(int fd, int n_samples)
@@ -165,18 +155,3 @@ int sysoff_probe(int fd, int n_samples)

    return SYSOFF_RUN_TIME_MISSING;
 }
-
-#else /* !PTP_SYS_OFFSET */
-
-int sysoff_measure(int fd, int n_samples,
-          int64_t *result, uint64_t *ts, int64_t *delay)
-{
-   return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-int sysoff_probe(int fd, int n_samples)
-{
-   return SYSOFF_COMPILE_TIME_MISSING;
-}
-
-#endif /* PTP_SYS_OFFSET */
diff --git a/sysoff.h b/sysoff.h
index 79d22908ce48..e4de91948231 100644
--- a/sysoff.h
+++ b/sysoff.h
@@ -19,9 +19,9 @@
  */

 #include <stdint.h>
+#include "missing.h"

 enum {
-   SYSOFF_COMPILE_TIME_MISSING = -2,
    SYSOFF_RUN_TIME_MISSING = -1,
    SYSOFF_PRECISE,
    SYSOFF_EXTENDED,
-- 
2.25.1

I was not allowed "git am"

This is a different kind of patch. It is not a patch against the openil/buildroot build system, therefore you shouldn't apply it to openil's git tree. Instead, it is a package patch. It gets applied on the linuxptp source code after it gets downloaded. So, you did the right thing. Please modify your local patch with this one and recompile qoriq-ptp4l again. Sorry for the trouble.

diegotxegp commented 4 years ago

Do not worry, Vladimir.

I have already built the new OpenIL with your patch and these are the results.

LS1021ATSN

[root@LS1021ATSN ~] # ptp4l -i swp2 -i swp3 -f /etc/ptp4l_cfg/gPTP.cfg -m --tx_timestamp_timeout 20 ptp4l[195.315]: selected /dev/ptp1 as PTP clock ptp4l[195.400]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[195.480]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[195.482]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[199.401]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[199.402]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[199.402]: assuming the grand master role ptp4l[199.439]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[199.440]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[199.441]: assuming the grand master role ptp4l[199.442]: assuming the grand master role ptp4l[360.900]: port 2: new foreign master aabbcc.fffe.00094a-1 ptp4l[360.901]: selected best master clock aabbcc.fffe.00094a ptp4l[360.901]: assuming the grand master role ptp4l[360.901]: assuming the grand master role

[root@LS1021ATSN ~] # phc2sys -a -rr --transportSpecific 0x1 -m phc2sys[296.589]: reconfiguring after port state change phc2sys[296.592]: selecting swp3 for synchronization phc2sys[296.594]: skipping swp2: swp3 has the same clock and is already selected phc2sys[296.596]: selecting CLOCK_REALTIME as the master clock phc2sys[296.598]: swp3 sys offset -16 s0 freq -20906 delay 6640 phc2sys[297.601]: swp3 sys offset 0 s2 freq -20890 delay 6800 phc2sys[298.602]: swp3 sys offset -24 s2 freq -20914 delay 6720 phc2sys[299.604]: swp3 sys offset -16 s2 freq -20913 delay 6640 phc2sys[300.605]: swp3 sys offset -48 s2 freq -20950 delay 6720 phc2sys[301.606]: swp3 sys offset -32 s2 freq -20948 delay 6640 phc2sys[302.608]: swp3 sys offset -32 s2 freq -20958 delay 6560 phc2sys[303.609]: swp3 sys offset -16 s2 freq -20952 delay 6640 phc2sys[304.611]: swp3 sys offset -96 s2 freq -21036 delay 6640 phc2sys[305.612]: swp3 sys offset 8 s2 freq -20961 delay 6640 phc2sys[306.614]: swp3 sys offset 8 s2 freq -20959 delay 6720 phc2sys[307.615]: swp3 sys offset -64 s2 freq -21028 delay 6640 phc2sys[308.616]: swp3 sys offset -80 s2 freq -21064 delay 6720 phc2sys[309.618]: swp3 sys offset -64 s2 freq -21072 delay 6720 phc2sys[310.619]: swp3 sys offset -40 s2 freq -21067 delay 6640 phc2sys[311.621]: swp3 sys offset -48 s2 freq -21087 delay 6640 phc2sys[312.622]: swp3 sys offset -8 s2 freq -21061 delay 6720 phc2sys[313.624]: swp3 sys offset -40 s2 freq -21096 delay 6720 phc2sys[314.625]: swp3 sys offset -40 s2 freq -21108 delay 6640 phc2sys[315.628]: swp3 sys offset -16 s2 freq -21096 delay 6800 phc2sys[316.629]: swp3 sys offset -104 s2 freq -21188 delay 6560 phc2sys[317.631]: swp3 sys offset -112 s2 freq -21228 delay 6640 phc2sys[318.632]: swp3 sys offset -88 s2 freq -21237 delay 6560 phc2sys[319.633]: swp3 sys offset -48 s2 freq -21224 delay 6640 phc2sys[320.635]: swp3 sys offset -104 s2 freq -21294 delay 6640 phc2sys[321.636]: swp3 sys offset -80 s2 freq -21301 delay 6640 phc2sys[322.638]: swp3 sys offset -80 s2 freq -21325 delay 6640 phc2sys[323.639]: swp3 sys offset -128 s2 freq -21397 delay 6640 phc2sys[324.640]: swp3 sys offset -128 s2 freq -21436 delay 6640 phc2sys[325.642]: swp3 sys offset -80 s2 freq -21426 delay 6640 phc2sys[326.643]: swp3 sys offset -80 s2 freq -21450 delay 6720 phc2sys[327.645]: swp3 sys offset -184 s2 freq -21578 delay 6640 phc2sys[328.646]: swp3 sys offset -160 s2 freq -21609 delay 6640 phc2sys[329.648]: swp3 sys offset -168 s2 freq -21665 delay 6560 phc2sys[330.649]: swp3 sys offset -176 s2 freq -21724 delay 6560 phc2sys[331.651]: swp3 sys offset -248 s2 freq -21848 delay 6560 phc2sys[332.652]: swp3 sys offset -184 s2 freq -21859 delay 6640 phc2sys[333.654]: swp3 sys offset -216 s2 freq -21946 delay 6640 phc2sys[334.655]: swp3 sys offset -304 s2 freq -22099 delay 6560 phc2sys[335.656]: swp3 sys offset -240 s2 freq -22126 delay 6640 phc2sys[336.658]: swp3 sys offset -336 s2 freq -22294 delay 6640 phc2sys[337.659]: swp3 sys offset -328 s2 freq -22387 delay 6720 phc2sys[338.661]: swp3 sys offset -368 s2 freq -22525 delay 6640 phc2sys[339.662]: swp3 sys offset -352 s2 freq -22620 delay 6640 phc2sys[340.664]: swp3 sys offset -440 s2 freq -22813 delay 6640 phc2sys[341.665]: swp3 sys offset -496 s2 freq -23001 delay 6640 phc2sys[342.666]: swp3 sys offset -456 s2 freq -23110 delay 6640 phc2sys[343.668]: swp3 sys offset -504 s2 freq -23295 delay 6640 phc2sys[344.669]: swp3 sys offset -576 s2 freq -23518 delay 6720 phc2sys[345.671]: swp3 sys offset -600 s2 freq -23715 delay 6640 phc2sys[346.672]: swp3 sys offset -688 s2 freq -23983 delay 6640 phc2sys[347.673]: swp3 sys offset -792 s2 freq -24293 delay 6640 phc2sys[348.675]: swp3 sys offset -760 s2 freq -24499 delay 6720 phc2sys[349.676]: swp3 sys offset -872 s2 freq -24839 delay 6640 phc2sys[350.678]: swp3 sys offset -872 s2 freq -25100 delay 6720 phc2sys[351.679]: swp3 sys offset -968 s2 freq -25458 delay 6640 phc2sys[352.680]: swp3 sys offset -1056 s2 freq -25836 delay 6720 phc2sys[353.682]: swp3 sys offset -1192 s2 freq -26289 delay 6640 phc2sys[354.683]: swp3 sys offset -1336 s2 freq -26791 delay 6640 phc2sys[355.685]: swp3 sys offset -1384 s2 freq -27240 delay 6640 phc2sys[356.686]: swp3 sys offset -1472 s2 freq -27743 delay 6640 phc2sys[357.688]: swp3 sys offset -1648 s2 freq -28360 delay 6640 phc2sys[358.690]: swp3 sys offset -1800 s2 freq -29007 delay 6640 phc2sys[359.691]: swp3 sys offset -1880 s2 freq -29627 delay 6640 phc2sys[360.693]: swp3 sys offset -2088 s2 freq -30399 delay 6560 phc2sys[361.694]: swp3 sys offset -2192 s2 freq -31129 delay 6640 phc2sys[362.696]: swp3 sys offset -2456 s2 freq -32051 delay 6640 phc2sys[363.697]: swp3 sys offset -2624 s2 freq -32956 delay 6720 phc2sys[364.699]: swp3 sys offset -2856 s2 freq -33975 delay 6640 phc2sys[365.700]: swp3 sys offset -3112 s2 freq -35088 delay 6640 phc2sys[366.701]: swp3 sys offset -3312 s2 freq -36221 delay 6640 phc2sys[367.703]: swp3 sys offset -3624 s2 freq -37527 delay 6640 phc2sys[368.704]: swp3 sys offset -3872 s2 freq -38862 delay 6640 phc2sys[369.706]: swp3 sys offset -4264 s2 freq -40416 delay 6640 phc2sys[370.707]: swp3 sys offset -4624 s2 freq -42055 delay 6640 phc2sys[371.709]: swp3 sys offset -4960 s2 freq -43778 delay 6640 phc2sys[372.710]: swp3 sys offset -5400 s2 freq -45706 delay 6720 phc2sys[373.712]: swp3 sys offset -5880 s2 freq -47806 delay 6720 phc2sys[374.713]: swp3 sys offset -6328 s2 freq -50018 delay 6640 phc2sys[375.714]: swp3 sys offset -6880 s2 freq -52468 delay 6640 phc2sys[376.716]: swp3 sys offset -7496 s2 freq -55148 delay 6640 phc2sys[377.717]: swp3 sys offset -8096 s2 freq -57997 delay 6720 phc2sys[378.719]: swp3 sys offset -8776 s2 freq -61106 delay 6720 phc2sys[379.720]: swp3 sys offset -9528 s2 freq -64491 delay 6720 phc2sys[380.722]: swp3 sys offset -10304 s2 freq -68125 delay 6720 phc2sys[381.726]: swp3 sys offset -11216 s2 freq -72128 delay 6640 phc2sys[382.728]: swp3 sys offset -12280 s2 freq -76557 delay 6720 phc2sys[383.729]: swp3 sys offset -13248 s2 freq -81209 delay 6800 phc2sys[384.731]: swp3 sys offset -14280 s2 freq -86216 delay 6640 phc2sys[385.733]: swp3 sys offset -15456 s2 freq -91676 delay 6720 phc2sys[386.735]: swp3 sys offset -16728 s2 freq -97584 delay 6560 phc2sys[387.736]: swp3 sys offset -18024 s2 freq -103899 delay 6720 phc2sys[388.738]: swp3 sys offset -19528 s2 freq -110810 delay 6640 phc2sys[389.739]: swp3 sys offset -21080 s2 freq -118220 delay 6560 phc2sys[390.741]: swp3 sys offset -22872 s2 freq -126336 delay 6640 phc2sys[391.742]: swp3 sys offset -24776 s2 freq -135102 delay 6640 phc2sys[392.744]: swp3 sys offset -26816 s2 freq -144575 delay 6640 phc2sys[393.745]: swp3 sys offset -29024 s2 freq -154828 delay 6640 phc2sys[394.747]: swp3 sys offset -31464 s2 freq -165975 delay 6720 phc2sys[395.748]: swp3 sys offset -34072 s2 freq -178022 delay 6560 phc2sys[396.750]: swp3 sys offset -36880 s2 freq -191052 delay 6720 phc2sys[397.751]: swp3 sys offset -39904 s2 freq -205140 delay 6640 phc2sys[398.753]: swp3 sys offset 144480 s2 freq -32727 delay 6640 phc2sys[399.754]: swp3 sys offset 156336 s2 freq +22473 delay 6640 phc2sys[400.756]: swp3 sys offset -45864 s2 freq -132826 delay 6640 phc2sys[401.757]: swp3 sys offset -48784 s2 freq -149505 delay 6720 phc2sys[402.759]: swp3 sys offset -46112 s2 freq -161468 delay 6640 phc2sys[403.760]: swp3 sys offset -42584 s2 freq -171774 delay 6640 phc2sys[404.762]: swp3 sys offset -40360 s2 freq -182325 delay 6640 phc2sys[405.763]: swp3 sys offset -39864 s2 freq -193937 delay 6640 phc2sys[406.765]: swp3 sys offset -40944 s2 freq -206976 delay 6720 phc2sys[407.766]: swp3 sys offset -43384 s2 freq -221700 delay 6640 phc2sys[408.768]: swp3 sys offset 157608 s2 freq -33723 delay 6640 phc2sys[409.769]: swp3 sys offset 170488 s2 freq +26440 delay 6640 phc2sys[410.771]: swp3 sys offset -49336 s2 freq -142238 delay 6720 phc2sys[411.772]: swp3 sys offset -52464 s2 freq -160167 delay 6640 phc2sys[412.774]: swp3 sys offset -49488 s2 freq -172930 delay 6720 phc2sys[413.775]: swp3 sys offset -45816 s2 freq -184104 delay 6640 phc2sys[414.777]: swp3 sys offset -43472 s2 freq -195505 delay 6720 phc2sys[415.778]: swp3 sys offset -43040 s2 freq -208115 delay 6640 phc2sys[416.780]: swp3 sys offset -44264 s2 freq -222251 delay 6720 phc2sys[417.781]: swp3 sys offset 157208 s2 freq -34058 delay 6560 phc2sys[418.783]: swp3 sys offset 170480 s2 freq +26376 delay 6720 phc2sys[419.785]: swp3 sys offset -49720 s2 freq -142680 delay 6640 phc2sys[420.786]: swp3 sys offset -52792 s2 freq -160668 delay 6640 phc2sys[421.788]: swp3 sys offset -49872 s2 freq -173585 delay 6720 phc2sys[422.789]: swp3 sys offset -46104 s2 freq -184779 delay 6560 phc2sys[423.791]: swp3 sys offset -43720 s2 freq -196226 delay 6560 phc2sys[424.792]: swp3 sys offset -43144 s2 freq -208766 delay 6640 phc2sys[425.794]: swp3 sys offset -44400 s2 freq -222965 delay 6720 phc2sys[426.796]: swp3 sys offset 157832 s2 freq -34053 delay 6640 phc2sys[427.797]: swp3 sys offset 171048 s2 freq +26512 delay 6720 phc2sys[428.798]: swp3 sys offset -49640 s2 freq -142861 delay 6640 phc2sys[429.800]: swp3 sys offset -52776 s2 freq -160889 delay 6640 phc2sys[430.802]: swp3 sys offset -49848 s2 freq -173794 delay 6640 phc2sys[431.803]: swp3 sys offset -46120 s2 freq -185020 delay 6720 phc2sys[432.805]: swp3 sys offset -43736 s2 freq -196472 delay 6640 phc2sys[433.806]: swp3 sys offset -43224 s2 freq -209081 delay 6640 phc2sys[434.807]: swp3 sys offset -44512 s2 freq -223336 delay 6640 phc2sys[435.809]: swp3 sys offset 158104 s2 freq -34074 delay 6720 phc2sys[436.810]: swp3 sys offset 171296 s2 freq +26549 delay 6640 phc2sys[437.812]: swp3 sys offset -49744 s2 freq -143102 delay 6640 phc2sys[438.813]: swp3 sys offset -52904 s2 freq -161185 delay 6640 phc2sys[439.815]: swp3 sys offset -50000 s2 freq -174152 delay 6640 phc2sys[440.816]: swp3 sys offset -46184 s2 freq -185336 delay 6720 phc2sys[441.818]: swp3 sys offset -43768 s2 freq -196776 delay 6640 phc2sys[442.819]: swp3 sys offset -43320 s2 freq -209458 delay 6640 phc2sys[443.821]: swp3 sys offset -44512 s2 freq -223646 delay 6640 phc2sys[444.822]: swp3 sys offset 158392 s2 freq -34096 delay 6640 phc2sys[445.824]: swp3 sys offset 171608 s2 freq +26638 delay 6640 phc2sys[446.825]: swp3 sys offset -49768 s2 freq -143256 delay 6640 phc2sys[447.827]: swp3 sys offset -52928 s2 freq -161346 delay 6640 phc2sys[448.828]: swp3 sys offset -50016 s2 freq -174312 delay 6640 phc2sys[449.830]: swp3 sys offset -46240 s2 freq -185541 delay 6560 phc2sys[450.831]: swp3 sys offset -43760 s2 freq -196933 delay 6640 phc2sys[451.833]: swp3 sys offset -43280 s2 freq -209581 delay 6640 phc2sys[452.834]: swp3 sys offset -44528 s2 freq -223813 delay 6640 phc2sys[453.836]: swp3 sys offset 158552 s2 freq -34092 delay 6640 phc2sys[454.837]: swp3 sys offset 171832 s2 freq +26754 delay 6640 phc2sys[455.839]: swp3 sys offset -49656 s2 freq -143184 delay 6720 phc2sys[456.841]: swp3 sys offset -52816 s2 freq -161241 delay 6640 phc2sys[457.842]: swp3 sys offset -49928 s2 freq -174198 delay 6640 phc2sys[458.844]: swp3 sys offset -46168 s2 freq -185416 delay 6640 phc2sys[459.845]: swp3 sys offset -43672 s2 freq -196771 delay 6640 phc2sys[460.847]: swp3 sys offset -43168 s2 freq -209368 delay 6640 phc2sys[461.849]: swp3 sys offset -44440 s2 freq -223591 delay 6640 phc2sys[462.850]: swp3 sys offset 158472 s2 freq -34011 delay 6720 phc2sys[463.852]: swp3 sys offset 171552 s2 freq +26611 delay 6640 phc2sys[464.853]: swp3 sys offset -49528 s2 freq -143004 delay 6640 phc2sys[465.855]: swp3 sys offset -52752 s2 freq -161086 delay 6640 phc2sys[466.856]: swp3 sys offset -49832 s2 freq -173992 delay 6640 phc2sys[467.858]: swp3 sys offset -46032 s2 freq -185141 delay 6640 phc2sys[468.859]: swp3 sys offset -43576 s2 freq -196495 delay 6640 phc2sys[469.861]: swp3 sys offset -43096 s2 freq -209088 delay 6640 phc2sys[470.862]: swp3 sys offset -44328 s2 freq -223248 delay 6720 phc2sys[471.864]: swp3 sys offset 158176 s2 freq -34043 delay 6640 phc2sys[472.866]: swp3 sys offset 171368 s2 freq +26602 delay 6640 phc2sys[473.867]: swp3 sys offset -49448 s2 freq -142804 delay 6640 phc2sys[474.868]: swp3 sys offset -52552 s2 freq -160742 delay 6640 phc2sys[475.870]: swp3 sys offset -49584 s2 freq -173540 delay 6640 phc2sys[476.871]: swp3 sys offset -45856 s2 freq -184687 delay 6640 phc2sys[477.873]: swp3 sys offset -43488 s2 freq -196076 delay 6720 phc2sys[478.875]: swp3 sys offset -42968 s2 freq -208602 delay 6720 phc2sys[479.876]: swp3 sys offset -44248 s2 freq -222772 delay 6640 phc2sys[480.878]: swp3 sys offset 157744 s2 freq -34055 delay 6640 phc2sys[481.880]: swp3 sys offset 171056 s2 freq +26580 delay 6640 phc2sys[482.881]: swp3 sys offset -49264 s2 freq -142423 delay 6720 phc2sys[483.883]: swp3 sys offset -52552 s2 freq -160490 delay 6640 phc2sys[484.884]: swp3 sys offset -49640 s2 freq -173344 delay 6640 phc2sys[485.886]: swp3 sys offset -45856 s2 freq -184452 delay 6640 phc2sys[486.887]: swp3 sys offset -43368 s2 freq -195720 delay 6560 phc2sys[487.889]: swp3 sys offset -42712 s2 freq -208075 delay 6720 phc2sys[488.890]: swp3 sys offset -43840 s2 freq -222016 delay 6640 phc2sys[489.892]: swp3 sys offset 157480 s2 freq -33848 delay 6640 phc2sys[490.893]: swp3 sys offset 170528 s2 freq +26444 delay 6640 phc2sys[491.895]: swp3 sys offset -48776 s2 freq -141702 delay 6640 phc2sys[492.896]: swp3 sys offset -51880 s2 freq -159439 delay 6640

Node

nodo2@nodo2-N-A:~$ sudo ptp4l -i enp3s0 -f /home/nodo2/linuxptp-2.0/configs/gPTP.cfg -m --tx_timestamp_timeout 20 [sudo] password for nodo2: ptp4l[334.339]: selected /dev/ptp0 as PTP clock ptp4l[334.376]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[334.377]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[338.350]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[338.350]: selected local clock aabbcc.fffe.00094a as best master ptp4l[338.350]: assuming the grand master role ptp4l[338.924]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[340.925]: selected best master clock 00049f.fffe.ef0808 ptp4l[340.926]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[341.758]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[342.385]: rms 5917392150883838 max 11834784301767748 freq -4297 +/- 3147 delay 233 +/- 1 ptp4l[343.385]: rms 3231 max 6065 freq -7386 +/- 2041 delay 232 +/- 0 ptp4l[344.387]: rms 1941 max 3923 freq -6367 +/- 2381 delay 229 +/- 0 ptp4l[345.388]: rms 1795 max 2822 freq -5371 +/- 2493 delay 224 +/- 0 ptp4l[346.390]: rms 1876 max 3030 freq -4957 +/- 2599 delay 225 +/- 0 ptp4l[347.391]: rms 2018 max 3170 freq -4859 +/- 2799 delay 224 +/- 0 ptp4l[348.392]: rms 2177 max 3394 freq -4897 +/- 3014 delay 224 +/- 0 ptp4l[349.394]: rms 2362 max 3795 freq -4988 +/- 3260 delay 222 +/- 0 ptp4l[350.395]: rms 2569 max 4136 freq -5009 +/- 3545 delay 222 +/- 0 ptp4l[351.397]: rms 2794 max 4466 freq -4974 +/- 3860 delay 222 +/- 0 ptp4l[352.398]: rms 3015 max 4814 freq -4971 +/- 4165 delay 222 +/- 0 ptp4l[353.399]: rms 3268 max 5222 freq -4962 +/- 4515 delay 222 +/- 0 ptp4l[354.401]: rms 3554 max 5656 freq -4913 +/- 4912 delay 222 +/- 0 ptp4l[355.403]: rms 3842 max 6134 freq -4908 +/- 5309 delay 222 +/- 0 ptp4l[356.404]: rms 4169 max 6668 freq -4908 +/- 5759 delay 220 +/- 0 ptp4l[357.405]: rms 4517 max 7212 freq -4882 +/- 6241 delay 220 +/- 0 ptp4l[358.407]: rms 4898 max 7822 freq -4843 +/- 6769 delay 218 +/- 0 ptp4l[359.409]: rms 5282 max 8459 freq -4746 +/- 7304 delay 216 +/- 0 ptp4l[360.410]: rms 5674 max 9025 freq -4667 +/- 7844 delay 214 +/- 0 ptp4l[361.411]: rms 6153 max 9910 freq -4773 +/- 8495 delay 212 +/- 0 ptp4l[362.412]: rms 6676 max 10797 freq -4841 +/- 9215 delay 212 +/- 0 ptp4l[363.413]: rms 7229 max 11664 freq -4781 +/- 9987 delay 209 +/- 0 ptp4l[364.415]: rms 7802 max 12543 freq -4738 +/- 10779 delay 205 +/- 0 ptp4l[365.416]: rms 8457 max 13628 freq -4718 +/- 11684 delay 203 +/- 0 ptp4l[366.418]: rms 9153 max 14713 freq -4642 +/- 12649 delay 203 +/- 0 ptp4l[367.419]: rms 9908 max 15938 freq -4593 +/- 13692 delay 201 +/- 0 ptp4l[368.420]: rms 10725 max 17245 freq -4527 +/- 14820 delay 198 +/- 0 ptp4l[369.422]: rms 11633 max 18712 freq -4462 +/- 16075 delay 198 +/- 0 ptp4l[370.423]: rms 12600 max 20308 freq -4444 +/- 17408 delay 196 +/- 0 ptp4l[371.425]: rms 13630 max 21962 freq -4379 +/- 18832 delay 196 +/- 0 ptp4l[372.426]: rms 14766 max 23784 freq -4296 +/- 20404 delay 196 +/- 0 ptp4l[373.428]: rms 15992 max 25783 freq -4235 +/- 22098 delay 192 +/- 0 ptp4l[374.429]: rms 17305 max 27900 freq -4159 +/- 23911 delay 188 +/- 0 ptp4l[375.431]: rms 18737 max 30225 freq -4093 +/- 25888 delay 184 +/- 0 ptp4l[376.431]: rms 69907 max 89146 freq -128690 +/- 37256 delay 184 +/- 0 ptp4l[377.433]: rms 23617 max 39464 freq -80307 +/- 32508 delay 221 +/- 0 ptp4l[378.435]: rms 131796 max 186279 freq +174235 +/- 29185 delay 203 +/- 0 ptp4l[379.436]: rms 17307 max 38755 freq +59800 +/- 23885 delay 159 +/- 0 ptp4l[380.437]: rms 35420 max 51971 freq -8934 +/- 14914 delay 176 +/- 0 ptp4l[381.439]: rms 29130 max 54769 freq -26852 +/- 19687 delay 166 +/- 0 ptp4l[382.440]: rms 19572 max 39710 freq -20947 +/- 23587 delay 160 +/- 0

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m [sudo] password for nodo2: phc2sys[371.720]: reconfiguring after port state change phc2sys[371.721]: selecting CLOCK_REALTIME for synchronization phc2sys[371.722]: selecting enp3s0 as the master clock phc2sys[371.722]: CLOCK_REALTIME phc offset 11834821300419491 s0 freq +0 delay 5580 phc2sys[372.723]: CLOCK_REALTIME phc offset 11834821300411213 s1 freq -8271 delay 5328 phc2sys[373.724]: CLOCK_REALTIME phc offset -57 s2 freq -8328 delay 5580 phc2sys[374.725]: CLOCK_REALTIME phc offset 35 s2 freq -8253 delay 5340 phc2sys[375.725]: CLOCK_REALTIME phc offset -3581 s2 freq -11859 delay 5556 phc2sys[376.726]: CLOCK_REALTIME phc offset -134402 s2 freq -143754 delay 5340 phc2sys[377.727]: CLOCK_REALTIME phc offset -20322 s2 freq -69995 delay 5365 phc2sys[378.728]: CLOCK_REALTIME phc offset 200997 s2 freq +145228 delay 5592 phc2sys[379.728]: CLOCK_REALTIME phc offset 96868 s2 freq +101398 delay 5339 phc2sys[380.729]: CLOCK_REALTIME phc offset -23407 s2 freq +10183 delay 5555 phc2sys[381.730]: CLOCK_REALTIME phc offset -64628 s2 freq -38060 delay 5376 phc2sys[382.730]: CLOCK_REALTIME phc offset -50097 s2 freq -42917 delay 5244 phc2sys[383.730]: CLOCK_REALTIME phc offset -21718 s2 freq -29568 delay 5028 phc2sys[384.731]: CLOCK_REALTIME phc offset -1311 s2 freq -15676 delay 5136 phc2sys[385.731]: CLOCK_REALTIME phc offset 3564 s2 freq -11194 delay 4896 phc2sys[386.731]: CLOCK_REALTIME phc offset -138530 s2 freq -152219 delay 4944 phc2sys[387.732]: CLOCK_REALTIME phc offset -20518 s2 freq -75766 delay 5136 phc2sys[388.733]: CLOCK_REALTIME phc offset 221747 s2 freq +160344 delay 5556 phc2sys[389.733]: CLOCK_REALTIME phc offset 106622 s2 freq +111743 delay 5315 phc2sys[390.734]: CLOCK_REALTIME phc offset -24737 s2 freq +12370 delay 5603 phc2sys[391.735]: CLOCK_REALTIME phc offset -69986 s2 freq -40300 delay 5364 phc2sys[392.736]: CLOCK_REALTIME phc offset -54437 s2 freq -45747 delay 5592 phc2sys[393.737]: CLOCK_REALTIME phc offset -23202 s2 freq -30843 delay 5232 phc2sys[394.737]: CLOCK_REALTIME phc offset -4604 s2 freq -19205 delay 5160 phc2sys[395.738]: CLOCK_REALTIME phc offset -138292 s2 freq -154275 delay 5316 phc2sys[396.739]: CLOCK_REALTIME phc offset -20059 s2 freq -77529 delay 5593 phc2sys[397.739]: CLOCK_REALTIME phc offset 225248 s2 freq +161760 delay 5593 phc2sys[398.740]: CLOCK_REALTIME phc offset 109792 s2 freq +113879 delay 5351 phc2sys[399.741]: CLOCK_REALTIME phc offset -23413 s2 freq +13611 delay 5591 phc2sys[400.742]: CLOCK_REALTIME phc offset -70063 s2 freq -40063 delay 5352 phc2sys[401.742]: CLOCK_REALTIME phc offset -54780 s2 freq -45799 delay 4944 phc2sys[402.743]: CLOCK_REALTIME phc offset -23750 s2 freq -31203 delay 4920 phc2sys[403.743]: CLOCK_REALTIME phc offset -4218 s2 freq -18796 delay 5580 phc2sys[404.745]: CLOCK_REALTIME phc offset -138721 s2 freq -154564 delay 5748 phc2sys[405.745]: CLOCK_REALTIME phc offset -22936 s2 freq -80395 delay 5436 phc2sys[406.746]: CLOCK_REALTIME phc offset 226361 s2 freq +162021 delay 5377 phc2sys[407.747]: CLOCK_REALTIME phc offset 110565 s2 freq +114133 delay 5603 phc2sys[408.748]: CLOCK_REALTIME phc offset -22582 s2 freq +14156 delay 5544 phc2sys[409.748]: CLOCK_REALTIME phc offset -69892 s2 freq -39929 delay 4908 phc2sys[410.749]: CLOCK_REALTIME phc offset -55002 s2 freq -46007 delay 5593 phc2sys[411.750]: CLOCK_REALTIME phc offset -23824 s2 freq -31329 delay 4884 phc2sys[412.751]: CLOCK_REALTIME phc offset -3687 s2 freq -18339 delay 5592 phc2sys[413.751]: CLOCK_REALTIME phc offset -138547 s2 freq -154305 delay 5124 phc2sys[414.752]: CLOCK_REALTIME phc offset -25112 s2 freq -82435 delay 5569 phc2sys[415.753]: CLOCK_REALTIME phc offset 227625 s2 freq +162769 delay 5257 phc2sys[416.753]: CLOCK_REALTIME phc offset 112292 s2 freq +115723 delay 4919 phc2sys[417.754]: CLOCK_REALTIME phc offset -22249 s2 freq +14870 delay 5196 phc2sys[418.755]: CLOCK_REALTIME phc offset -70266 s2 freq -39822 delay 5232 phc2sys[419.755]: CLOCK_REALTIME phc offset -55440 s2 freq -46076 delay 5220 phc2sys[420.756]: CLOCK_REALTIME phc offset -24295 s2 freq -31563 delay 5184 phc2sys[421.757]: CLOCK_REALTIME phc offset -3580 s2 freq -18136 delay 4932 phc2sys[422.757]: CLOCK_REALTIME phc offset -138810 s2 freq -154440 delay 5592 phc2sys[423.758]: CLOCK_REALTIME phc offset -28012 s2 freq -85285 delay 4945 phc2sys[424.758]: CLOCK_REALTIME phc offset 228884 s2 freq +163207 delay 5413 phc2sys[425.759]: CLOCK_REALTIME phc offset 113522 s2 freq +116511 delay 5592 phc2sys[426.760]: CLOCK_REALTIME phc offset -21503 s2 freq +15542 delay 5543 phc2sys[427.761]: CLOCK_REALTIME phc offset -70466 s2 freq -39872 delay 5772 phc2sys[428.761]: CLOCK_REALTIME phc offset -55915 s2 freq -46461 delay 5592 phc2sys[429.762]: CLOCK_REALTIME phc offset -24410 s2 freq -31730 delay 5592 phc2sys[430.763]: CLOCK_REALTIME phc offset -3429 s2 freq -18072 delay 5016 phc2sys[431.763]: CLOCK_REALTIME phc offset -138476 s2 freq -154148 delay 4908 phc2sys[432.764]: CLOCK_REALTIME phc offset -30127 s2 freq -87342 delay 5569 phc2sys[433.764]: CLOCK_REALTIME phc offset 229804 s2 freq +163551 delay 5148 phc2sys[434.764]: CLOCK_REALTIME phc offset 115672 s2 freq +118361 delay 5159 phc2sys[435.765]: CLOCK_REALTIME phc offset -21138 s2 freq +16252 delay 5375

It seems quite similar from my point of view. Big offsets. Both ptp4l and phc2sys. What do you think? But did you say that you get better results in your office? What am I doing bad?

Diego

vladimiroltean commented 4 years ago

But did you say that you get better results in your office?

Yes, quite different results.

[root@LS1021ATSN ~] # journalctl -b -u phc2sys -f
-- Logs begin at Tue 2020-06-23 10:31:52 UTC. --
Jun 23 15:41:29 LS1021ATSN phc2sys[626]: [27502.186] swp5 sys offset         3 s2 freq  -20380 delay   6720
Jun 23 15:41:30 LS1021ATSN phc2sys[626]: [27503.187] swp5 sys offset       -80 s2 freq  -20462 delay   6720
Jun 23 15:41:31 LS1021ATSN phc2sys[626]: [27504.189] swp5 sys offset       -19 s2 freq  -20425 delay   6720
Jun 23 15:41:32 LS1021ATSN phc2sys[626]: [27505.190] swp5 sys offset        57 s2 freq  -20355 delay   6800
Jun 23 15:41:33 LS1021ATSN phc2sys[626]: [27506.192] swp5 sys offset       -19 s2 freq  -20413 delay   6720
Jun 23 15:41:34 LS1021ATSN phc2sys[626]: [27507.193] swp5 sys offset        56 s2 freq  -20344 delay   6720
Jun 23 15:41:35 LS1021ATSN phc2sys[626]: [27508.195] swp5 sys offset       -48 s2 freq  -20431 delay   6720
Jun 23 15:41:36 LS1021ATSN phc2sys[626]: [27509.196] swp5 sys offset        50 s2 freq  -20348 delay   6720
Jun 23 15:41:37 LS1021ATSN phc2sys[626]: [27510.197] swp5 sys offset       -48 s2 freq  -20431 delay   6640
Jun 23 15:41:38 LS1021ATSN phc2sys[626]: [27511.199] swp5 sys offset       -19 s2 freq  -20416 delay   6640
Jun 23 15:41:39 LS1021ATSN phc2sys[626]: [27512.200] swp5 sys offset       -29 s2 freq  -20432 delay   6720
Jun 23 15:41:40 LS1021ATSN phc2sys[626]: [27513.201] swp5 sys offset       -18 s2 freq  -20430 delay   6640
Jun 23 15:41:41 LS1021ATSN phc2sys[626]: [27514.203] swp5 sys offset        48 s2 freq  -20369 delay   6720

What am I doing bad?

I don't know yet. Your phc2sys delays are much lower now, which means we finally got past the issue we were trying to solve (we have PTP_SYS_OFFSET_EXTENDED now). But we have a different problem. Could you add --step_threshold 0.00002 --first_step_threshold 0.00002 to the arguments of phc2sys and do the test again?

diegotxegp commented 4 years ago

LS1021ATSN

[root@LS1021ATSN ~] # ptp4l -i swp2 -i swp3 -f /etc/ptp4l_cfg/gPTP.cfg -m --tx_timestamp_timeout 20 ptp4l[195.315]: selected /dev/ptp1 as PTP clock ptp4l[195.400]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[195.480]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[195.482]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[199.401]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[199.402]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[199.402]: assuming the grand master role ptp4l[199.439]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[199.440]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[199.441]: assuming the grand master role ptp4l[199.442]: assuming the grand master role ptp4l[360.900]: port 2: new foreign master aabbcc.fffe.00094a-1 ptp4l[360.901]: selected best master clock aabbcc.fffe.00094a ptp4l[360.901]: assuming the grand master role ptp4l[360.901]: assuming the grand master role ptp4l[1769.318]: port 2: rogue peer delay response ptp4l[1769.319]: port 2: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[1769.390]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[1769.390]: assuming the grand master role ptp4l[1769.390]: assuming the grand master role ptp4l[1785.470]: port 2: FAULTY to LISTENING on INIT_COMPLETE ptp4l[1789.215]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1789.215]: selected local clock 00049f.fffe.ef0808 as best master ptp4l[1789.215]: assuming the grand master role ptp4l[1789.215]: assuming the grand master role ptp4l[1805.662]: port 2: new foreign master aabbcc.fffe.00094a-1 ptp4l[1805.662]: selected best master clock aabbcc.fffe.00094a ptp4l[1805.662]: assuming the grand master role ptp4l[1805.663]: assuming the grand master role

[root@LS1021ATSN ~] # phc2sys -a -rr --transportSpecific 0x1 -m --step_threshold 0.00002 --first_step_threshold 0.00002 phc2sys[1739.458]: reconfiguring after port state change phc2sys[1739.459]: selecting swp3 for synchronization phc2sys[1739.460]: skipping swp2: swp3 has the same clock and is already selected phc2sys[1739.460]: selecting CLOCK_REALTIME as the master clock phc2sys[1739.463]: swp3 sys offset 80 s0 freq -20920 delay 6880 phc2sys[1740.466]: swp3 sys offset -40 s2 freq -21040 delay 6720 phc2sys[1741.467]: swp3 sys offset 64 s2 freq -20976 delay 6720 phc2sys[1742.469]: swp3 sys offset 24 s2 freq -20996 delay 6640 phc2sys[1743.470]: swp3 sys offset 0 s2 freq -21013 delay 6640 phc2sys[1744.472]: swp3 sys offset 40 s2 freq -20973 delay 6720 phc2sys[1745.473]: swp3 sys offset 48 s2 freq -20953 delay 6720 phc2sys[1746.475]: swp3 sys offset 0 s2 freq -20987 delay 6640 phc2sys[1747.476]: swp3 sys offset -8 s2 freq -20995 delay 6640 phc2sys[1748.478]: swp3 sys offset -32 s2 freq -21021 delay 6640 phc2sys[1749.479]: swp3 sys offset -48 s2 freq -21047 delay 6640 phc2sys[1750.481]: swp3 sys offset -64 s2 freq -21077 delay 6640 phc2sys[1751.482]: swp3 sys offset -24 s2 freq -21056 delay 6640 phc2sys[1752.484]: swp3 sys offset -72 s2 freq -21112 delay 6640 phc2sys[1753.485]: swp3 sys offset -32 s2 freq -21093 delay 6640 phc2sys[1754.487]: swp3 sys offset -56 s2 freq -21127 delay 6640 phc2sys[1755.488]: swp3 sys offset -40 s2 freq -21128 delay 6640 phc2sys[1756.490]: swp3 sys offset -72 s2 freq -21172 delay 6640 phc2sys[1757.491]: swp3 sys offset -64 s2 freq -21185 delay 6720 phc2sys[1758.493]: swp3 sys offset -128 s2 freq -21268 delay 6720 phc2sys[1759.494]: swp3 sys offset -96 s2 freq -21275 delay 6640 phc2sys[1760.496]: swp3 sys offset -88 s2 freq -21296 delay 6640 phc2sys[1761.498]: swp3 sys offset -104 s2 freq -21338 delay 6720 phc2sys[1762.499]: swp3 sys offset -88 s2 freq -21353 delay 6720 phc2sys[1763.500]: swp3 sys offset -168 s2 freq -21460 delay 6720 phc2sys[1764.502]: swp3 sys offset -176 s2 freq -21518 delay 6640 phc2sys[1765.503]: swp3 sys offset -176 s2 freq -21571 delay 6640 phc2sys[1766.505]: swp3 sys offset -152 s2 freq -21600 delay 6720 phc2sys[1767.506]: swp3 sys offset -168 s2 freq -21661 delay 6640 phc2sys[1768.508]: swp3 sys offset -176 s2 freq -21720 delay 6640 phc2sys[1769.508]: port 00049f.fffe.ef0808-2 changed state phc2sys[1769.509]: reconfiguring after port state change phc2sys[1769.510]: selecting swp3 for synchronization phc2sys[1769.510]: skipping swp2: swp3 has the same clock and is already selected phc2sys[1769.510]: selecting CLOCK_REALTIME as the master clock phc2sys[1769.512]: swp3 sys offset -232 s2 freq -21828 delay 6640 phc2sys[1770.514]: swp3 sys offset -216 s2 freq -21882 delay 6720 phc2sys[1771.515]: swp3 sys offset -304 s2 freq -22035 delay 6640 phc2sys[1772.516]: swp3 sys offset -288 s2 freq -22110 delay 6640 phc2sys[1773.518]: swp3 sys offset -320 s2 freq -22228 delay 6640 phc2sys[1774.519]: swp3 sys offset -312 s2 freq -22316 delay 6720 phc2sys[1775.521]: swp3 sys offset -392 s2 freq -22490 delay 6640 phc2sys[1776.522]: swp3 sys offset -408 s2 freq -22624 delay 6640 phc2sys[1777.524]: swp3 sys offset -480 s2 freq -22818 delay 6720 phc2sys[1778.525]: swp3 sys offset -464 s2 freq -22946 delay 6720 phc2sys[1779.527]: swp3 sys offset -576 s2 freq -23197 delay 6640 phc2sys[1780.528]: swp3 sys offset -680 s2 freq -23474 delay 6640 phc2sys[1781.530]: swp3 sys offset -696 s2 freq -23694 delay 6640 phc2sys[1782.531]: swp3 sys offset -720 s2 freq -23927 delay 6640 phc2sys[1783.533]: swp3 sys offset -800 s2 freq -24223 delay 6720 phc2sys[1784.534]: swp3 sys offset -904 s2 freq -24567 delay 6640 phc2sys[1785.536]: swp3 sys offset -976 s2 freq -24910 delay 6640 phc2sys[1786.537]: swp3 sys offset -1032 s2 freq -25259 delay 6720 phc2sys[1787.539]: swp3 sys offset -1240 s2 freq -25776 delay 6640 phc2sys[1788.540]: swp3 sys offset -1272 s2 freq -26180 delay 6720 phc2sys[1789.542]: swp3 sys offset -1408 s2 freq -26698 delay 6720 phc2sys[1790.543]: swp3 sys offset -1496 s2 freq -27208 delay 6720 phc2sys[1791.545]: swp3 sys offset -1632 s2 freq -27793 delay 6720 phc2sys[1792.546]: swp3 sys offset -1816 s2 freq -28467 delay 6640 phc2sys[1793.548]: swp3 sys offset -2024 s2 freq -29220 delay 6640 phc2sys[1794.549]: swp3 sys offset -2200 s2 freq -30003 delay 6720 phc2sys[1795.551]: swp3 sys offset -2480 s2 freq -30943 delay 6640 phc2sys[1796.552]: swp3 sys offset -2664 s2 freq -31871 delay 6720 phc2sys[1797.554]: swp3 sys offset -2912 s2 freq -32918 delay 6640 phc2sys[1798.555]: swp3 sys offset -3232 s2 freq -34112 delay 6640 phc2sys[1799.557]: swp3 sys offset -3520 s2 freq -35369 delay 6720 phc2sys[1800.558]: swp3 sys offset -3880 s2 freq -36785 delay 6640 phc2sys[1801.560]: swp3 sys offset -4264 s2 freq -38333 delay 6640 phc2sys[1802.562]: swp3 sys offset -4736 s2 freq -40084 delay 6480 phc2sys[1803.563]: swp3 sys offset -5128 s2 freq -41897 delay 6640 phc2sys[1804.564]: swp3 sys offset -5576 s2 freq -43884 delay 6720 phc2sys[1805.566]: swp3 sys offset -6128 s2 freq -46108 delay 6720

Node

nodo2@nodo2-N-A:~$ sudo ptp4l -i enp3s0 -f /home/nodo2/linuxptp-2.0/configs/gPTP.cfg -m --tx_timestamp_timeout 20 [sudo] password for nodo2: ptp4l[1746.302]: selected /dev/ptp0 as PTP clock ptp4l[1746.341]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1746.341]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[1750.252]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[1750.340]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1750.340]: selected local clock aabbcc.fffe.00094a as best master ptp4l[1750.340]: assuming the grand master role ptp4l[1752.253]: selected best master clock 00049f.fffe.ef0808 ptp4l[1752.253]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[1752.680]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[1753.306]: rms 7742463 max 15502682 freq +25830 +/- 95588 delay 231 +/- 0 ptp4l[1754.307]: rms 828 max 1696 freq -7992 +/- 1107 delay 229 +/- 0 ptp4l[1755.309]: rms 1063 max 1473 freq -5793 +/- 614 delay 160 +/- 0 ptp4l[1756.311]: rms 716 max 1086 freq -5384 +/- 447 delay 229 +/- 0 ptp4l[1757.312]: rms 394 max 714 freq -5490 +/- 441 delay 229 +/- 0 ptp4l[1758.314]: rms 355 max 546 freq -5712 +/- 491 delay 231 +/- 0 ptp4l[1759.315]: rms 411 max 701 freq -5854 +/- 553 delay 233 +/- 0 ptp4l[1760.317]: rms 452 max 751 freq -5858 +/- 619 delay 233 +/- 0 ptp4l[1761.318]: rms 485 max 763 freq -5831 +/- 669 delay 231 +/- 0 ptp4l[1762.320]: rms 536 max 830 freq -5821 +/- 740 delay 233 +/- 0 ptp4l[1763.321]: rms 583 max 905 freq -5825 +/- 806 delay 233 +/- 0 ptp4l[1763.353]: port 1: rogue peer delay response ptp4l[1763.353]: port 1: SLAVE to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[1779.429]: port 1: FAULTY to LISTENING on INIT_COMPLETE ptp4l[1779.773]: clockcheck: clock jumped forward or running faster than expected! ptp4l[1782.670]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[1783.110]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1783.110]: selected local clock aabbcc.fffe.00094a as best master ptp4l[1783.110]: assuming the grand master role ptp4l[1784.670]: selected best master clock 00049f.fffe.ef0808 ptp4l[1784.671]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[1785.571]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[1786.323]: rms 11834821803151266 max 11834821817768128 freq +46873802 +/- 27065367 delay 229 +/- 4 ptp4l[1787.305]: rms 11834821743520196 max 11834821770897780 freq +62499999 +/- 0 delay 223 +/- 0 ptp4l[1788.243]: rms 11834821680919326 max 11834821708305064 freq +62499999 +/- 0 delay 221 +/- 0 ptp4l[1789.182]: rms 11834821618319886 max 11834821645698568 freq +62499999 +/- 0 delay 221 +/- 0 ptp4l[1790.027]: port 1: SLAVE to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1790.027]: selected local clock aabbcc.fffe.00094a as best master ptp4l[1790.027]: assuming the grand master role ptp4l[1811.453]: port 1: rogue peer delay response ptp4l[1811.453]: port 1: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[1827.516]: port 1: FAULTY to LISTENING on INIT_COMPLETE ptp4l[1831.159]: port 1: new foreign master 00049f.fffe.ef0808-2 ptp4l[1831.413]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[1831.413]: selected local clock aabbcc.fffe.00094a as best master ptp4l[1831.413]: assuming the grand master role

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 -m --step_threshold 0.00002 --first_step_threshold 0.00002 [sudo] password for nodo2: phc2sys[1763.990]: port aabbcc.fffe.00094a-1 changed state phc2sys[1763.993]: reconfiguring after port state change phc2sys[1763.995]: selecting enp3s0 for synchronization phc2sys[1763.995]: selecting CLOCK_REALTIME as the master clock phc2sys[1763.995]: enp3s0 sys offset -11834821817799453 s0 freq -4599 delay 6832 phc2sys[1764.996]: enp3s0 sys offset -11834821817797343 s1 freq -2491 delay 6352 phc2sys[1765.997]: enp3s0 sys offset -6942 s2 freq -9433 delay 6304 phc2sys[1766.998]: enp3s0 sys offset -1976 s2 freq -6549 delay 6848 phc2sys[1767.998]: enp3s0 sys offset 136 s2 freq -5030 delay 6352 phc2sys[1768.999]: enp3s0 sys offset 710 s2 freq -4415 delay 6320 phc2sys[1770.000]: enp3s0 sys offset 711 s2 freq -4201 delay 6800 phc2sys[1771.000]: enp3s0 sys offset 426 s2 freq -4273 delay 6848 phc2sys[1772.001]: enp3s0 sys offset 264 s2 freq -4307 delay 6320 phc2sys[1773.001]: enp3s0 sys offset 116 s2 freq -4376 delay 6832 phc2sys[1774.002]: enp3s0 sys offset 78 s2 freq -4379 delay 6304 phc2sys[1775.003]: enp3s0 sys offset 0 s2 freq -4434 delay 6848 phc2sys[1776.004]: enp3s0 sys offset -21 s2 freq -4455 delay 6848 phc2sys[1777.004]: enp3s0 sys offset -54 s2 freq -4494 delay 6784 phc2sys[1778.005]: enp3s0 sys offset -7 s2 freq -4463 delay 6784 phc2sys[1779.006]: enp3s0 sys offset 28 s2 freq -4430 delay 6336 phc2sys[1780.007]: enp3s0 sys offset -19 s2 freq -4469 delay 5360 phc2sys[1781.007]: enp3s0 sys offset 41 s2 freq -4415 delay 6784 phc2sys[1782.007]: enp3s0 sys offset -41 s2 freq -4484 delay 5632 phc2sys[1783.007]: enp3s0 sys offset -9 s2 freq -4465 delay 5280 phc2sys[1784.008]: port aabbcc.fffe.00094a-1 changed state phc2sys[1784.009]: reconfiguring after port state change phc2sys[1784.009]: selecting enp3s0 for synchronization phc2sys[1784.009]: selecting CLOCK_REALTIME as the master clock phc2sys[1784.009]: enp3s0 sys offset 100 s0 freq -4465 delay 6288 phc2sys[1785.010]: port aabbcc.fffe.00094a-1 changed state phc2sys[1785.010]: reconfiguring after port state change phc2sys[1785.011]: master clock not ready, waiting... phc2sys[1786.011]: port aabbcc.fffe.00094a-1 changed state phc2sys[1786.011]: reconfiguring after port state change phc2sys[1786.012]: selecting CLOCK_REALTIME for synchronization phc2sys[1786.012]: selecting enp3s0 as the master clock phc2sys[1786.012]: CLOCK_REALTIME phc offset 19761624 s0 freq -9051 delay 5160 phc2sys[1787.012]: CLOCK_REALTIME phc offset 82277953 s1 freq +62495652 delay 4932 phc2sys[1788.013]: CLOCK_REALTIME phc offset 476974 s0 freq +62495652 delay 4905 phc2sys[1789.013]: CLOCK_REALTIME phc offset 477178 s0 freq +62495652 delay 5242 phc2sys[1790.014]: CLOCK_REALTIME phc offset 477370 s1 freq +62495832 delay 5400 phc2sys[1791.015]: port aabbcc.fffe.00094a-1 changed state phc2sys[1791.016]: reconfiguring after port state change phc2sys[1791.017]: selecting enp3s0 for synchronization phc2sys[1791.017]: selecting CLOCK_REALTIME as the master clock phc2sys[1791.017]: enp3s0 sys offset 190 s0 freq -4465 delay 6375 phc2sys[1792.018]: enp3s0 sys offset 401 s2 freq -4247 delay 6360 phc2sys[1793.018]: enp3s0 sys offset 66703658 s0 freq -4247 delay 5504 phc2sys[1794.019]: enp3s0 sys offset 133412406 s0 freq -4247 delay 6336 phc2sys[1795.019]: enp3s0 sys offset 200126214 s1 freq +62499999 delay 6832 phc2sys[1796.020]: enp3s0 sys offset -2278 s2 freq +62497721 delay 5895 phc2sys[1797.020]: enp3s0 sys offset 284 s2 freq +62499600 delay 6360 phc2sys[1798.021]: enp3s0 sys offset 890 s2 freq +62499999 delay 6405 phc2sys[1799.021]: enp3s0 sys offset 1052 s2 freq +62499999 delay 6480 phc2sys[1800.022]: enp3s0 sys offset 1259 s2 freq +62499999 delay 6360 phc2sys[1801.022]: enp3s0 sys offset 1403 s2 freq +62499999 delay 6420 phc2sys[1802.022]: enp3s0 sys offset 1539 s2 freq +62499999 delay 5235 phc2sys[1803.023]: enp3s0 sys offset 1706 s2 freq +62499999 delay 5025 phc2sys[1804.023]: enp3s0 sys offset 1889 s2 freq +62499999 delay 5955 phc2sys[1805.024]: enp3s0 sys offset 2061 s2 freq +62499999 delay 6405 phc2sys[1806.024]: enp3s0 sys offset 2219 s2 freq +62499999 delay 6780 phc2sys[1807.025]: enp3s0 sys offset 2424 s2 freq +62499999 delay 5595 phc2sys[1808.025]: enp3s0 sys offset 2548 s2 freq +62499999 delay 5895 phc2sys[1809.026]: enp3s0 sys offset 2770 s2 freq +62499999 delay 5880 phc2sys[1810.027]: enp3s0 sys offset 2939 s2 freq +62499999 delay 5895 phc2sys[1811.027]: enp3s0 sys offset 3054 s2 freq +62499999 delay 5025 phc2sys[1812.027]: port aabbcc.fffe.00094a-1 changed state phc2sys[1812.028]: reconfiguring after port state change phc2sys[1812.028]: selecting enp3s0 for synchronization phc2sys[1812.028]: selecting CLOCK_REALTIME as the master clock phc2sys[1812.028]: enp3s0 sys offset 3230 s2 freq +62499999 delay 5235 phc2sys[1813.029]: enp3s0 sys offset 3416 s2 freq +62499999 delay 6405 phc2sys[1814.029]: enp3s0 sys offset 3579 s2 freq +62499999 delay 6405 phc2sys[1815.030]: enp3s0 sys offset 3783 s2 freq +62499999 delay 5895 phc2sys[1816.031]: enp3s0 sys offset 3951 s2 freq +62499999 delay 6405 phc2sys[1817.031]: enp3s0 sys offset 4120 s2 freq +62499999 delay 6450 phc2sys[1818.031]: enp3s0 sys offset 4315 s2 freq +62499999 delay 4980 phc2sys[1819.032]: enp3s0 sys offset 4487 s2 freq +62499999 delay 5880 phc2sys[1820.032]: enp3s0 sys offset 4707 s2 freq +62499999 delay 4935 phc2sys[1821.033]: enp3s0 sys offset 4868 s2 freq +62499999 delay 6405 phc2sys[1822.033]: enp3s0 sys offset 5067 s2 freq +62499999 delay 5655 phc2sys[1823.034]: enp3s0 sys offset 5253 s2 freq +62499999 delay 5955 phc2sys[1824.034]: enp3s0 sys offset 5455 s2 freq +62499999 delay 6360 phc2sys[1825.035]: enp3s0 sys offset 5595 s2 freq +62499999 delay 5895

Suddenly, node stopped synchronisation and assumed its clock as a master.

diegotxegp commented 4 years ago

My network is like I explained you at another Github issue about ptp4l. A LS1021ATSN platform acts as a master, and identical slave nodes are connected to ETH2 and ETH3 ports of LS1021ATSN. OpenIL version is 1.8 (May 2020)

Tell me what exact instructions you use to run this network in 802.1AS mode. Just what you do. Maybe I skipped some step accidentally. If not, I do not understand what is happening.

vladimiroltean commented 4 years ago

Tell me what exact instructions you use to run this network in 802.1AS mode

Yes, the only difference in my setup is that I'm using the master branch of OpenIL (plus the patch I gave you for fixing PTP_SYS_OFFSET_EXTENDED with phc2sys and sja1105), while you're using the 1.8 release tag. But, between the release tag and the master branch, another very similar rogue peer delay response bug report has been submitted (and fixed, on the master branch only): https://github.com/openil/openil/issues/54

So, (while I do understand that it is rather annoying to reflash the SD card again), I think it is worth a shot to fetch and checkout the openil master branch, then make nxp_ls1021atsn_defconfig && make again. The point with using the openil master branch is that it includes this patch: https://github.com/openil/openil/commit/3556336e79d56c7cbd023c66fb4df2fae19611ac which will compile the linux kernel from its respective master branch (linux-5.4.y), which is going to contain this fix: https://github.com/openil/linux/commit/adc93ad9ad0e51c8c10700c2d846ffeb3a1a2ced

diegotxegp commented 4 years ago

Sorry for the question. Could you explain me the steps to follow to compile the master branch of OpenIL? I am afraid I will confuse instead.

Thank you in advance, Vladimir, and sorry.

vladimiroltean commented 4 years ago
git fetch origin
git reset --hard origin/master # This will lose any changes you had. If you want to keep something, commit it and rebase it on top.
# Now there are 2 options, either rm -rf output, or use the existing build artefacts. This will depend on your own judgement based on what were the changes that were done. In this particular case, it looks ok to not delete the output folder. So just:
make nxp_ls1021atsn_defconfig
make 2&>1 | tee output/build.log

If everything goes as intended, linux will be compiled from the linux-5.4.y branch this time.

diegotxegp commented 4 years ago

Vladimir. I follow your steps and nothing was compiled. The sdcard.img is the same, dated yesterday. /output/build.log is empty.

vladimiroltean commented 4 years ago

Sorry, I had a typo. Instead of "make 2&>1" it should be "make 2>&1", to redirect stderr to stdout.

diegotxegp commented 4 years ago

I compiled it and theses are the results.

LS1021ATSN

[root@LS1021ATSN ~] # ptp4l -i swp2 -i swp3 -f /etc/ptp4l_cfg/gPTP.cfg -m --tx_timestamp_timeout 20
ptp4l[200.432]: selected /dev/ptp1 as PTP clock
ptp4l[200.540]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[200.620]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[200.622]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[203.810]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[203.811]: selected local clock 00049f.fffe.ef0808 as best master
ptp4l[203.811]: assuming the grand master role
ptp4l[203.871]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[203.871]: selected local clock 00049f.fffe.ef0808 as best master
ptp4l[203.871]: assuming the grand master role
ptp4l[203.871]: assuming the grand master role
ptp4l[890.991]: port 2: rogue peer delay response
ptp4l[890.991]: port 2: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
ptp4l[891.070]: selected local clock 00049f.fffe.ef0808 as best master
ptp4l[891.070]: assuming the grand master role
ptp4l[891.070]: assuming the grand master role
ptp4l[907.150]: port 2: FAULTY to LISTENING on INIT_COMPLETE
ptp4l[910.591]: port 2: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[910.592]: selected local clock 00049f.fffe.ef0808 as best master
ptp4l[910.592]: assuming the grand master role
ptp4l[910.592]: assuming the grand master role
ptp4l[926.883]: port 2: new foreign master aabbcc.fffe.00094a-1
ptp4l[926.883]: selected best master clock aabbcc.fffe.00094a
ptp4l[926.883]: assuming the grand master role
ptp4l[926.883]: assuming the grand master role
ptp4l[949.276]: selected best master clock aabbcc.fffe.00094a
ptp4l[949.276]: assuming the grand master role
ptp4l[949.276]: assuming the grand master role
ptp4l[986.940]: selected best master clock aabbcc.fffe.00094a
ptp4l[986.941]: assuming the grand master role
ptp4l[986.941]: assuming the grand master role

[root@LS1021ATSN ~] # phc2sys -a -rr --transportSpecific 0x1 --step_threshold 0.0002 --first_step_threshold 0.0002 -m
phc2sys[1242.741]: reconfiguring after port state change
phc2sys[1242.743]: selecting swp3 for synchronization
phc2sys[1242.744]: skipping swp2: swp3 has the same clock and is already selected
phc2sys[1242.744]: selecting CLOCK_REALTIME as the master clock
phc2sys[1242.745]: swp3 sys offset        -8 s0 freq  -20696 delay   6640
phc2sys[1243.747]: swp3 sys offset        32 s2 freq  -20656 delay   6720
phc2sys[1244.749]: swp3 sys offset       -40 s2 freq  -20696 delay   6720
phc2sys[1245.750]: swp3 sys offset       -40 s2 freq  -20708 delay   6720
phc2sys[1246.752]: swp3 sys offset       -40 s2 freq  -20720 delay   6640
phc2sys[1247.753]: swp3 sys offset        40 s2 freq  -20652 delay   6720
phc2sys[1248.754]: port 00049f.fffe.ef0808-2 changed state
phc2sys[1248.754]: reconfiguring after port state change
phc2sys[1248.755]: selecting swp3 for synchronization
phc2sys[1248.755]: skipping swp2: swp3 has the same clock and is already selected
phc2sys[1248.755]: selecting CLOCK_REALTIME as the master clock
phc2sys[1248.757]: swp3 sys offset        72 s2 freq  -20608 delay   6880
phc2sys[1249.758]: swp3 sys offset      -104 s2 freq  -20762 delay   6720
phc2sys[1250.759]: swp3 sys offset       -72 s2 freq  -20762 delay   6640
phc2sys[1251.761]: swp3 sys offset         8 s2 freq  -20703 delay   6640
phc2sys[1252.762]: swp3 sys offset        -8 s2 freq  -20717 delay   6720
phc2sys[1253.764]: swp3 sys offset        16 s2 freq  -20695 delay   6720
phc2sys[1254.765]: swp3 sys offset        32 s2 freq  -20674 delay   6720
phc2sys[1255.767]: swp3 sys offset       -32 s2 freq  -20729 delay   6720
phc2sys[1256.768]: swp3 sys offset        80 s2 freq  -20626 delay   6800
phc2sys[1257.770]: swp3 sys offset         0 s2 freq  -20682 delay   6720
phc2sys[1258.771]: swp3 sys offset        32 s2 freq  -20650 delay   6800
phc2sys[1259.773]: swp3 sys offset       -72 s2 freq  -20745 delay   6640
phc2sys[1260.774]: swp3 sys offset        64 s2 freq  -20630 delay   6720
phc2sys[1261.776]: swp3 sys offset       -16 s2 freq  -20691 delay   6720
phc2sys[1262.777]: swp3 sys offset       -48 s2 freq  -20728 delay   6720
phc2sys[1263.778]: swp3 sys offset        16 s2 freq  -20678 delay   6720
phc2sys[1264.780]: swp3 sys offset         8 s2 freq  -20682 delay   6640
phc2sys[1265.781]: swp3 sys offset        24 s2 freq  -20663 delay   6640
phc2sys[1266.783]: swp3 sys offset        32 s2 freq  -20648 delay   6640
phc2sys[1267.784]: swp3 sys offset        40 s2 freq  -20630 delay   6640
phc2sys[1268.786]: swp3 sys offset        40 s2 freq  -20618 delay   6720
phc2sys[1269.787]: swp3 sys offset       -16 s2 freq  -20662 delay   6640
phc2sys[1270.789]: swp3 sys offset        64 s2 freq  -20587 delay   6720
phc2sys[1271.790]: swp3 sys offset       -56 s2 freq  -20688 delay   6720
phc2sys[1272.792]: swp3 sys offset       -24 s2 freq  -20673 delay   6720
phc2sys[1273.793]: swp3 sys offset       -40 s2 freq  -20696 delay   6640
phc2sys[1274.794]: swp3 sys offset        -8 s2 freq  -20676 delay   6640
phc2sys[1275.796]: swp3 sys offset         8 s2 freq  -20662 delay   6640
phc2sys[1276.797]: swp3 sys offset        48 s2 freq  -20620 delay   6720

Node

nodo2@nodo2-N-A:~$ sudo ptp4l -i enp3s0 -f /home/nodo2/linuxptp-2.0/configs/gPTP.cfg -m --tx_timestamp_timeout 20
ptp4l[1224.865]: selected /dev/ptp0 as PTP clock
ptp4l[1224.897]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1224.897]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1227.926]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[1227.926]: selected local clock aabbcc.fffe.00094a as best master
ptp4l[1227.926]: assuming the grand master role
ptp4l[1228.159]: port 1: new foreign master 00049f.fffe.ef0808-2
ptp4l[1230.159]: selected best master clock 00049f.fffe.ef0808
ptp4l[1230.161]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
ptp4l[1231.066]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[1231.817]: rms  449 max  589 freq  -5651 +/- 296 delay   234 +/-   0
ptp4l[1232.819]: rms   73 max  144 freq  -5828 +/-  88 delay   234 +/-   0
ptp4l[1233.820]: rms  107 max  119 freq  -6066 +/-  46 delay   233 +/-   0
ptp4l[1234.822]: rms   62 max   99 freq  -6091 +/-  22 delay   234 +/-   0
ptp4l[1235.823]: rms   25 max   31 freq  -6083 +/-   5 delay   233 +/-   0
ptp4l[1236.825]: rms   19 max   35 freq  -6078 +/-  24 delay   233 +/-   0
ptp4l[1237.826]: rms   21 max   26 freq  -6104 +/-  12 delay   233 +/-   0
ptp4l[1238.828]: rms   24 max   35 freq  -6088 +/-  34 delay   231 +/-   0
ptp4l[1239.829]: rms   14 max   18 freq  -6059 +/-   5 delay   230 +/-   0
ptp4l[1240.831]: rms   18 max   25 freq  -6105 +/-   6 delay   231 +/-   0
ptp4l[1241.832]: rms   14 max   23 freq  -6104 +/-  16 delay   231 +/-   0
ptp4l[1242.834]: rms    9 max   14 freq  -6089 +/-  12 delay   231 +/-   0
ptp4l[1243.835]: rms   15 max   23 freq  -6078 +/-  19 delay   231 +/-   0
ptp4l[1244.839]: rms   14 max   22 freq  -6064 +/-  15 delay   231 +/-   0
ptp4l[1245.840]: rms   17 max   27 freq  -6062 +/-  23 delay   235 +/-   0
ptp4l[1246.842]: rms   15 max   24 freq  -6052 +/-  20 delay   235 +/-   0
ptp4l[1247.843]: rms    7 max   15 freq  -6065 +/-   7 delay   231 +/-   0
ptp4l[1248.844]: rms   24 max   33 freq  -6056 +/-  34 delay   235 +/-   0
ptp4l[1249.846]: rms   12 max   19 freq  -6074 +/-   8 delay   237 +/-   0
ptp4l[1250.848]: rms   24 max   41 freq  -6106 +/-  16 delay   237 +/-   0
ptp4l[1251.849]: rms   21 max   30 freq  -6121 +/-  11 delay   237 +/-   0
ptp4l[1252.851]: rms   16 max   25 freq  -6105 +/-  23 delay   235 +/-   0
ptp4l[1253.852]: rms   14 max   19 freq  -6099 +/-  20 delay   235 +/-   0
ptp4l[1254.854]: rms   24 max   43 freq  -6076 +/-  30 delay   233 +/-   0
ptp4l[1255.855]: rms    8 max   16 freq  -6085 +/-  12 delay   233 +/-   0
ptp4l[1256.857]: rms   39 max   57 freq  -6043 +/-  49 delay   233 +/-   0
ptp4l[1257.858]: rms    8 max   14 freq  -6044 +/-   8 delay   235 +/-   0
ptp4l[1258.859]: rms   24 max   46 freq  -6072 +/-  29 delay   235 +/-   0
ptp4l[1259.861]: rms   29 max   51 freq  -6104 +/-  22 delay   235 +/-   0
ptp4l[1260.863]: rms   24 max   49 freq  -6112 +/-  23 delay   235 +/-   0
ptp4l[1261.865]: rms   39 max   61 freq  -6075 +/-  54 delay   235 +/-   0
ptp4l[1262.866]: rms   14 max   23 freq  -6080 +/-  19 delay   235 +/-   0
ptp4l[1263.868]: rms   23 max   45 freq  -6092 +/-  30 delay   237 +/-   0
ptp4l[1264.869]: rms   22 max   39 freq  -6100 +/-  27 delay   237 +/-   0
ptp4l[1265.871]: rms   26 max   41 freq  -6096 +/-  36 delay   237 +/-   0
ptp4l[1266.873]: rms   22 max   42 freq  -6098 +/-  30 delay   237 +/-   0
ptp4l[1267.874]: rms   29 max   45 freq  -6080 +/-  40 delay   237 +/-   0
ptp4l[1268.875]: rms   37 max   56 freq  -6056 +/-  50 delay   237 +/-   0
ptp4l[1269.878]: rms   13 max   28 freq  -6073 +/-  16 delay   237 +/-   0
ptp4l[1270.879]: rms   32 max   50 freq  -6099 +/-  37 delay   237 +/-   0
ptp4l[1271.880]: rms   32 max   45 freq  -6080 +/-  45 delay   235 +/-   0
ptp4l[1272.881]: rms   26 max   35 freq  -6064 +/-  36 delay   235 +/-   0
ptp4l[1273.883]: rms   30 max   44 freq  -6067 +/-  41 delay   235 +/-   0
ptp4l[1274.885]: rms   34 max   56 freq  -6087 +/-  42 delay   235 +/-   0
ptp4l[1275.886]: rms   38 max   69 freq  -6109 +/-  45 delay   235 +/-   0
ptp4l[1276.888]: rms   42 max   64 freq  -6100 +/-  57 delay   237 +/-   0
ptp4l[1277.889]: rms   42 max   63 freq  -6067 +/-  58 delay   235 +/-   0
ptp4l[1278.891]: rms   35 max   52 freq  -6086 +/-  47 delay   235 +/-   0
ptp4l[1279.892]: rms   40 max   66 freq  -6095 +/-  53 delay   235 +/-   0
ptp4l[1280.894]: rms   42 max   68 freq  -6101 +/-  55 delay   237 +/-   0
ptp4l[1281.896]: rms   41 max   63 freq  -6090 +/-  58 delay   237 +/-   0
ptp4l[1282.897]: rms   51 max   73 freq  -6074 +/-  72 delay   237 +/-   0
ptp4l[1283.898]: rms   53 max   76 freq  -6061 +/-  75 delay   237 +/-   0
ptp4l[1284.900]: rms   68 max  106 freq  -6014 +/-  92 delay   237 +/-   0
ptp4l[1285.901]: rms   47 max   89 freq  -6089 +/-  44 delay   237 +/-   0
ptp4l[1286.903]: rms   79 max  137 freq  -6130 +/-  94 delay   237 +/-   0
ptp4l[1287.904]: rms   66 max  106 freq  -6107 +/-  90 delay   237 +/-   0
ptp4l[1288.905]: rms   93 max  142 freq  -6039 +/- 128 delay   237 +/-   0
ptp4l[1289.907]: rms   50 max   88 freq  -6069 +/-  68 delay   237 +/-   0
ptp4l[1290.909]: rms   83 max  124 freq  -6084 +/- 113 delay   235 +/-   0
ptp4l[1291.911]: rms   78 max  121 freq  -6091 +/- 105 delay   235 +/-   0
ptp4l[1292.912]: rms   90 max  136 freq  -6090 +/- 125 delay   233 +/-   0
ptp4l[1293.914]: rms   96 max  144 freq  -6080 +/- 134 delay   235 +/-   0
ptp4l[1294.915]: rms   90 max  135 freq  -6080 +/- 125 delay   233 +/-   0
ptp4l[1295.917]: rms  108 max  169 freq  -6099 +/- 147 delay   233 +/-   0
ptp4l[1296.918]: rms  123 max  178 freq  -6044 +/- 173 delay   231 +/-   0
ptp4l[1297.920]: rms  104 max  166 freq  -6073 +/- 142 delay   233 +/-   0
ptp4l[1298.921]: rms  134 max  202 freq  -6094 +/- 182 delay   233 +/-   0
ptp4l[1299.923]: rms  125 max  198 freq  -6109 +/- 167 delay   233 +/-   0
ptp4l[1300.924]: rms  144 max  217 freq  -6109 +/- 199 delay   233 +/-   0
ptp4l[1301.925]: rms  147 max  199 freq  -6082 +/- 205 delay   233 +/-   0
ptp4l[1302.927]: rms  150 max  214 freq  -6071 +/- 210 delay   233 +/-   0
ptp4l[1303.929]: rms  163 max  236 freq  -6067 +/- 227 delay   233 +/-   0
ptp4l[1304.930]: rms  175 max  249 freq  -6040 +/- 246 delay   233 +/-   0
ptp4l[1305.931]: rms  178 max  262 freq  -6057 +/- 245 delay   233 +/-   0
ptp4l[1306.933]: rms  196 max  286 freq  -6060 +/- 271 delay   233 +/-   0
ptp4l[1307.935]: rms  206 max  302 freq  -6067 +/- 283 delay   233 +/-   0
ptp4l[1308.936]: rms  220 max  342 freq  -6096 +/- 298 delay   233 +/-   0
ptp4l[1309.938]: rms  237 max  343 freq  -6087 +/- 327 delay   233 +/-   0
ptp4l[1310.940]: rms  251 max  363 freq  -6080 +/- 348 delay   233 +/-   0
ptp4l[1311.942]: rms  270 max  380 freq  -6050 +/- 377 delay   233 +/-   0
ptp4l[1312.944]: rms  268 max  401 freq  -6071 +/- 369 delay   233 +/-   0
ptp4l[1313.946]: rms  310 max  450 freq  -6078 +/- 428 delay   231 +/-   0
ptp4l[1314.948]: rms  316 max  451 freq  -6057 +/- 440 delay   231 +/-   0
ptp4l[1315.949]: rms  335 max  494 freq  -6071 +/- 463 delay   228 +/-   0

nodo2@nodo2-N-A:~$ sudo phc2sys -a -rr --transportSpecific 0x1 --step_threshold 0.0002 --first_step_threshold 0.0002 -m
phc2sys[1232.390]: reconfiguring after port state change
phc2sys[1232.392]: selecting CLOCK_REALTIME for synchronization
phc2sys[1232.392]: selecting enp3s0 as the master clock
phc2sys[1232.392]: CLOCK_REALTIME phc offset       630 s0 freq  -10694 delay   5604
phc2sys[1233.394]: CLOCK_REALTIME phc offset       775 s2 freq  -10549 delay   5604
phc2sys[1234.396]: CLOCK_REALTIME phc offset       617 s2 freq   -9932 delay   5364
phc2sys[1235.398]: CLOCK_REALTIME phc offset       -84 s2 freq  -10448 delay   5592
phc2sys[1236.399]: CLOCK_REALTIME phc offset      -356 s2 freq  -10745 delay   5592
phc2sys[1237.400]: CLOCK_REALTIME phc offset      -324 s2 freq  -10820 delay   5340
phc2sys[1238.401]: CLOCK_REALTIME phc offset      -196 s2 freq  -10789 delay   5556
phc2sys[1239.401]: CLOCK_REALTIME phc offset       -22 s2 freq  -10674 delay   5556
phc2sys[1240.402]: CLOCK_REALTIME phc offset       -36 s2 freq  -10695 delay   5112
phc2sys[1241.403]: CLOCK_REALTIME phc offset       -60 s2 freq  -10729 delay   5604
phc2sys[1242.404]: CLOCK_REALTIME phc offset       -68 s2 freq  -10755 delay   5328
phc2sys[1243.404]: CLOCK_REALTIME phc offset        34 s2 freq  -10674 delay   5244
phc2sys[1244.404]: CLOCK_REALTIME phc offset        22 s2 freq  -10676 delay   5340
phc2sys[1245.405]: CLOCK_REALTIME phc offset        95 s2 freq  -10596 delay   5220
phc2sys[1246.406]: CLOCK_REALTIME phc offset       -12 s2 freq  -10675 delay   5148
phc2sys[1247.407]: CLOCK_REALTIME phc offset        46 s2 freq  -10620 delay   5604
phc2sys[1248.407]: CLOCK_REALTIME phc offset       -34 s2 freq  -10686 delay   5364
phc2sys[1249.408]: CLOCK_REALTIME phc offset         1 s2 freq  -10662 delay   5544
phc2sys[1250.409]: CLOCK_REALTIME phc offset       -23 s2 freq  -10685 delay   5376
phc2sys[1251.410]: CLOCK_REALTIME phc offset       -14 s2 freq  -10683 delay   5544
phc2sys[1252.410]: CLOCK_REALTIME phc offset       -49 s2 freq  -10722 delay   5352
phc2sys[1253.411]: CLOCK_REALTIME phc offset       -42 s2 freq  -10730 delay   5604
phc2sys[1254.412]: CLOCK_REALTIME phc offset       -33 s2 freq  -10734 delay   5244
phc2sys[1255.413]: CLOCK_REALTIME phc offset        47 s2 freq  -10664 delay   5592
phc2sys[1256.413]: CLOCK_REALTIME phc offset        37 s2 freq  -10659 delay   5604
phc2sys[1257.414]: CLOCK_REALTIME phc offset        79 s2 freq  -10606 delay   5125
phc2sys[1258.414]: CLOCK_REALTIME phc offset        -7 s2 freq  -10669 delay   4932
phc2sys[1259.415]: CLOCK_REALTIME phc offset        -2 s2 freq  -10666 delay   4896
phc2sys[1260.415]: CLOCK_REALTIME phc offset      -142 s2 freq  -10806 delay   4908
phc2sys[1261.415]: CLOCK_REALTIME phc offset        20 s2 freq  -10687 delay   5172
phc2sys[1262.416]: CLOCK_REALTIME phc offset       -17 s2 freq  -10718 delay   5544
phc2sys[1263.417]: CLOCK_REALTIME phc offset        -9 s2 freq  -10715 delay   5556
phc2sys[1264.417]: CLOCK_REALTIME phc offset       -12 s2 freq  -10721 delay   5040
phc2sys[1265.417]: CLOCK_REALTIME phc offset       -37 s2 freq  -10749 delay   4945
phc2sys[1266.418]: CLOCK_REALTIME phc offset       -26 s2 freq  -10749 delay   5484
phc2sys[1267.418]: CLOCK_REALTIME phc offset         3 s2 freq  -10728 delay   5136
phc2sys[1268.418]: CLOCK_REALTIME phc offset        28 s2 freq  -10702 delay   5004
phc2sys[1269.419]: CLOCK_REALTIME phc offset        39 s2 freq  -10683 delay   4944
phc2sys[1270.419]: CLOCK_REALTIME phc offset       -77 s2 freq  -10787 delay   5172
phc2sys[1271.420]: CLOCK_REALTIME phc offset       -40 s2 freq  -10773 delay   4908
phc2sys[1272.421]: CLOCK_REALTIME phc offset        37 s2 freq  -10708 delay   5592
phc2sys[1273.421]: CLOCK_REALTIME phc offset         4 s2 freq  -10730 delay   5544
phc2sys[1274.422]: CLOCK_REALTIME phc offset         3 s2 freq  -10730 delay   5592
phc2sys[1275.423]: CLOCK_REALTIME phc offset       -37 s2 freq  -10769 delay   4932
phc2sys[1276.423]: CLOCK_REALTIME phc offset       -37 s2 freq  -10780 delay   5376
phc2sys[1277.424]: CLOCK_REALTIME phc offset        -3 s2 freq  -10757 delay   5364
phc2sys[1278.424]: CLOCK_REALTIME phc offset         5 s2 freq  -10750 delay   5340
phc2sys[1279.425]: CLOCK_REALTIME phc offset       -14 s2 freq  -10768 delay   5196
phc2sys[1280.426]: CLOCK_REALTIME phc offset        46 s2 freq  -10712 delay   5328
phc2sys[1281.426]: CLOCK_REALTIME phc offset       -48 s2 freq  -10792 delay   5568
phc2sys[1282.427]: CLOCK_REALTIME phc offset        12 s2 freq  -10747 delay   5124
phc2sys[1283.428]: CLOCK_REALTIME phc offset        33 s2 freq  -10722 delay   5712
phc2sys[1284.428]: CLOCK_REALTIME phc offset        59 s2 freq  -10686 delay   5592
phc2sys[1285.429]: CLOCK_REALTIME phc offset       133 s2 freq  -10594 delay   5629
phc2sys[1286.430]: CLOCK_REALTIME phc offset      -141 s2 freq  -10828 delay   5148
phc2sys[1287.431]: CLOCK_REALTIME phc offset       -73 s2 freq  -10803 delay   5592
phc2sys[1288.431]: CLOCK_REALTIME phc offset       -23 s2 freq  -10775 delay   5364

If you notice, ptp4l offsets of the node are increasing each time.

I used the commands you purposed in section 8.2.3 "Synchronized 802.1Qbv demo" or the last recommendations about commands; --transportSpecific 0x1 --step_threshold 0.0002 --first_step_threshold 0.0002

It seems it does not improve. Curious.

vladimiroltean commented 4 years ago

Hi Diego,

You need to understand very precisely what we're doing here, and why it is so finicky. So we have a PTP clock over SPI (a slow, and vastly jittery bus) which we want to discipline. There's a high-performance way of doing it (hardware timestamping, i.e. using Ethernet or the PTP pin) and a low-performance way (software synchronization, i.e. "read clock A, write that time to clock B"). phc2sys synchronizes the system time and the sja1105 time using that low-performance way. The more time passes between the moment when you read clock A and the moment when you write clock B, the worse they will be in sync. And the more that time interval varies, the less stable the sync will be. That interval is printed by phc2sys on each line, in nanoseconds (example: delay 164400, which is a value that is both rather large, as well as rather variable). The whole "compiling with the right kernel headers" thing was just to make use of a kernel concept called "SPI software timestamping", which is available to phc2sys via a PTP_SYS_OFFSET_EXTENDED which is relatively new to the kernel, hence most libc toolchains don't have it, and phc2sys gets compiled without this support. When PTP_SYS_OFFSET_EXTENDED is enabled, you can see that the delay reported by phc2sys is much lower: delay 6720 (more than an order of magnitude lower, in fact). But the underlying SPI transactions are not at all faster. Instead, what is going on is that the SPI driver is recording the system time, with a byte-level granularity, at which the SPI transfer containing the PTP time of the sja1105 switch took place. Then it provides that system time to user space as a cross-timestamp of the switch's PTP time, and the application has a much better idea of what is the offset between the 2 clocks. If you read the lkml link I sent, you'll see that my measurements at the time were min -378 max 381. You are within that threshold right now (although, to be fair, I wouldn't be surprised if your further phc2sys testing would show values that exceed that. When I did perform the phc2sys use case optimization, the SPI driver was using "TCFQ" mode, which basically means byte-by-byte transmission. That was great for accuracy of cross-timestamping but it was horribly inefficient. Since then, I had to switch the SPI driver to XSPI FIFO mode, which is a lot better for throughput but slightly worse in terms of accuracy, because it's recording the time for larger chunks of bytes). So, for what it is, I think it is "good enough". Now, there's just one practical problem, and that is that you're using the LS1021A-TSN board as a grandmaster, and when the GM's time is disciplined using software timestamping, that's bad news because it incurs jitter into everybody else's clocks too (which you can quite clearly see happening, if you compare the ptp4l offsets of nodo2 with, and without phc2sys running on the LS1021A-TSN GM). This is exactly why I said before that the LS1021A-TSN does not exactly make for an amazing GM, because it doesn't have a very good source of time to serve into the network (doesn't even have a battery-backed RTC, so if you're not using NTP to synchronize CLOCK_REALTIME to 2020, then there's little point IMO in even running phc2sys between a system clock free-running in 1970, and a PTP clock which is also free-running in 1970). When the LS1021A-TSN is acting as a plain PTP slave, things are slightly less bad with phc2sys, because that +/- 400ns jitter caused by software timestamping is not propagated anywhere except to the local CLOCK_REALTIME (and that jitter is relatively low enough that it won't make a big different to time-aware Linux processes running on it).

One trick you can do to make software synchronization more precise is to force the CPUs to run at constant (and maximum) frequency:

for cpu in cpu0 cpu1; do cat /sys/bus/cpu/devices/${cpu}/cpufreq/scaling_max_freq > /sys/bus/cpu/devices/${cpu}/cpufreq/scaling_min_freq; done

If you notice, ptp4l offsets of the node are increasing each time.

How much do they increase? Is it unbounded?

Hope this helps, -Vladimir