Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2,050 Views

ptp4l source code - Precise Time Protocol (PTP)

Hello,

I am doing some experiments on PTP using ptp4l that comes with Linux. one experiment I made it using Yocto and another one using Linux fedora but there is a difference in the option between them. I need to compare the source code to know how they are working. I found the source code for fedora and I am wondering how can I find the source code for ptp4l that exists on Yocto?

0 Kudos
15 Replies
Highlighted
Community Manager
114 Views

Hello Alghamdi,

 

 

Thanks for reaching out!

 

 

In order to find out where to find this source code, you will have to download the BSP of the image version that you are using. There is no need to build the BSP but instead, you can look for the recipe that includes this package (ptp4l) into the image. When you find this recipe, you will be able to see where the BSP is fetching it from. Then you can download it and analyze it.

 

 

I'll assume that you're using the latest image for Galileo, you can find its BSP in https://iotdk.intel.com/src/3.5/galileo/.

 

 

I hope this information helps you,

 

Pedro M.
0 Kudos
Highlighted
Community Manager
114 Views

Hello Alghamdi,

 

 

Do you have any updates about this?

 

 

Pedro M.
0 Kudos
Highlighted
Beginner
114 Views

Hello Pedro,

Sorry for delay in reply and thank you for your attention.

I am using Yocto 3.8.7 and I thing it is different from the image that you mentioned. I downloaded the files that are in this link https://iotdk.intel.com/src/3.5/galileo/ https://iotdk.intel.com/src/3.5/galileo/ but I didn't find ptp4l and I just found ptpd instead.

Is that correct?

Regards,

Alghamdi

0 Kudos
Highlighted
Community Manager
114 Views

Hello Alghamdi,

 

 

The source found in https://iotdk.intel.com/src/3.5/galileo/ is for the image that can be downloaded from https://iotdk.intel.com/images/3.5/galileo/. This is the newest image, if you are using any other version, I'd suggest you to try with this one. You may encounter differences, perhaps the ptpd version in this image works closer to what you'd expect.

 

 

Let me know.

 

Pedro M.
0 Kudos
Highlighted
Beginner
114 Views

Hello Pedro,

I already have results by using ptp4l but in two devices and each device has different version of ptp4l. I found the source code for Fedora version but I am still searching on Yocto version. I think that using ptpd wouldn't help me because I will need weeks to repeat my experiments by using the same program on all devices!

Regards,

Alghamdi

0 Kudos
Highlighted
Community Manager
114 Views

I understand, then, I believe the best way to get the closest results to equal would be by building the same package from source on both devices. My suggestion is that you either download the version installed on your Fedora PC and build it from source on the Galileo or that you download the latest version of ptp4l from http://linuxptp.sourceforge.net/ and build it on both your Galileo and your Fedora PC.

 

 

I believe this is the best way to get the closest results to equal on both platforms.

 

 

Let me know how it goes.

 

Pedro M.
0 Kudos
Highlighted
Beginner
114 Views

Hello Pedro,

I tried to download the source code as shown on http://linuxptp.sourceforge.net/ http://linuxptp.sourceforge.net/ by using the following command:

git clone git://git.code.sf.net/p/linuxptp/code linuxptp ,but it didn't work because I cannot access to internet using Galileo, so do have any Idea how can I access to Internet using Galileo?

Regards,

Waleed

0 Kudos
Highlighted
Honored Contributor I
114 Views

Alghamdi wrote:

Hello Pedro,

I tried to download the source code as shown on http://linuxptp.sourceforge.net/ http://linuxptp.sourceforge.net/ by using the following command:

git clone git://git.code.sf.net/p/linuxptp/code linuxptp ,but it didn't work because I cannot access to internet using Galileo, so do have any Idea how can I access to Internet using Galileo?

Regards,

Waleed

Hi Alghamdi,

I think you have two options:

1) Temporarily connect the Intel Galileo to the Internet, so that you download all the software you need.

2) Download the code to another computer, connected to the Internet, and later transfer the code to the Intel Galileo

HTH,

Fernando.

0 Kudos
Highlighted
Beginner
114 Views

Hi Fernando,

I installed git by connecting the Intel Galileo to the Internet and I followed the steps as in http://linuxptp.sourceforge.net/ but when I want to do step no 6.1 with command:

cp /boot/config-2.6.38-bpo.2-686 $KBUILD_OUTPUT/.config

I got this message: cp: can't stat '/boot/config-2.6.38-bpo.2-686': No such file or directory

when I navigated to this directory I didn't find any file with extension 'config'. Do you have any Idea what is the problem?

Regards,

Waleed

0 Kudos
Highlighted
Honored Contributor I
114 Views

Alghamdi wrote:

Hi Fernando,

I installed git by connecting the Intel Galileo to the Internet and I followed the steps as in http://linuxptp.sourceforge.net/ http://linuxptp.sourceforge.net/ but when I want to do step no 6.1 with command:

cp /boot/config-2.6.38-bpo.2-686 $KBUILD_OUTPUT/.config

I got this message: cp: can't stat '/boot/config-2.6.38-bpo.2-686': No such file or directory

when I navigated to this directory I didn't find any file with extension 'config'. Do you have any Idea what is the problem?

Regards,

Waleed

 

Hi Walled,

I don't have any idea... maybe the Intel people does.

Fernando.

0 Kudos
Highlighted
Community Manager
114 Views

Hi Waleed,

Reading through the installation process of http://linuxptp.sourceforge.net/ The Linux PTP Project , the section 6.1 states that is only an example. Are you sure that you have the kernel headers available in order to compile the Linux PTP stack?

We will be waiting for your reply, have a nice day!

Best Regards,

 

-Jose P.
0 Kudos
Highlighted
Community Manager
114 Views

Hello Waleed,

 

 

Do you have any updates about this?

 

 

Pedro M.
0 Kudos
Highlighted
Beginner
114 Views

Hi Jose,

Sorry for delay. I was away of experiments.

unfortunately, I am not expert in Linux so I don't know how can I make sure if the kernel headers available or not. in general, I didn't understand how can I do the installation section.

Regards,

Waleed

0 Kudos
Highlighted
Community Manager
114 Views

Hello Waleed,

 

 

In section 6.1 of http://linuxptp.sourceforge.net/, you can find how set up the environment, including the kernel headers for compiling the PTP package.

 

 

However, if you still have issues building the PTP package on your Galileo, you'd might be interested in contacting its developer for help. You can do so in https://sourceforge.net/projects/linuxptp/support?source=navbar.

 

 

Pedro M.
0 Kudos
Highlighted
Beginner
114 Views

Hello Pedro,

I will contact them and thank you for help.

Waleed

0 Kudos