Absence of ptp clock file

3.9k Views Asked by At

I am trying to implement linuxptp on arm embedded target device. Got the source files and compiled it. When i try running the ptp4l command, i get the following result.

root@analog:/home/analog/Documents/linuxptp-2.0# ./ptp4l -i eth0 -m
ptp4l[1165.106]: selected /dev/ptp0 as PTP clock
ptp4l[1165.107]: Failed to open /dev/ptp0: No such file or directory
failed to create a clock

Checking the /dev directory, i find there is no ptp related clock files. Searching the web, i got to know that sometimes we have to create the device file manually using mknod and its MAJOR number. On my particular device, major number is 250. Hence, i created the node file in the following manner.

root@analog:/dev# mknod ptp0 c 250 0

Now when i try to run the ptp4l command, i still get the error that ptp0 is not available. Next i tried to make node file using a different name and specifying it.

root@analog:/dev# mknod ptp1 c 250 0
root@analog:/home/analog/Documents/linuxptp-2.0# ./ptp4l -i eth0 -p /dev/ptp1 -m                                                                                                                            
ptp4l[1409.116]: selected /dev/ptp1 as PTP clock
ptp4l[1409.126]: Failed to open /dev/ptp1: No such device or address
failed to create a clock

Source for using mknod for making ptp clock file : https://sourceforge.net/p/linuxptp/mailman/message/32687321/

Further searching, it is suggested not to do this and get the udev to make the ptp clock file. I am not sure how i would go about making the udev do it for me. Searching it also doesn't yield any helpful resources. Can anyone suggest/guide me as to how to approach this problem?

0

There are 0 best solutions below