twteamware / raspberrypi-ptp

How to run IEEE-1588 on RaspberryPi hardware
78 stars 23 forks source link

[Question]How to patch kernel? #3

Closed ohmsa closed 5 years ago

ohmsa commented 5 years ago

Hello.

I am using Raspberry pi 3 B+@Raspbian. I have already done "PTP on Raspberrypi3 with Raspbian" and having problem.

When I command ethtool -T eth0, I get, I get Time stamping parameters for eth0: Capabilities: software-receive (SOF_TIMESTAMPING_RX_SOFTWARE) software-system-clock (SOF_TIMESTAMPING_SOFTWARE) PTP Hardware Clock: none Hardware Transmit Timestamp Modes: none Hardware Receive Filter Modes: none

Then I have to perform kernel patching. Github says

Run these commands from within the linux kernel sources directory. git checkout -b ptp-patches git am /patches/0001-smsc95xx-use-generic-ethtool_op_get_ts_info-callback

  1. Where should I perform "git checkout?"
  2. How to check "path-to-this repo"?

Thank you.

gizero commented 5 years ago

I haven't had a chance to test PTP setup with RPi 3B+ which uses a different ethernet hardware and driver than RPi 3.

Very likely a patch similar to that this repo provides (which applies to drivers/net/usb/smsc95xx.c driver) needs to be crafted for drivers/net/usb/lan78xx.c.

If you manage to get it working with the above suggestion, it would be nice if you can provide a pull request to this repo to improve its coverage to RPi 3B+ as well.

tiagofreire-pt commented 2 years ago

@gizero , solution for this: https://github.com/twteamware/raspberrypi-ptp/issues/5#issuecomment-1024879115