At the time of writing (kernel version 6.4.10) the upstream linux ice driver does not support PPS in/out on the E810. Conversely, Intel's ice driver does.
In the following we'll briefly explain how to compile and install. We use Fedora 38 and we compile a custom kernel (because we also want the ptp_ocp driver for the OCP Timecard) but "the kernel is the kernel" and a similar approach ought to work on most distributions.
First we wget the kernel source:
[root@dl360-fedora ~]# cd /usr/src/kernels/
[root@dl360-fedora kernels]# wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.10.tar.gz
--2023-08-21 10:02:47-- https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.10.tar.gz
Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.1.176, 151.101.65.176, 151.101.129.176, ...
Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 221647527 (211M) [application/x-gzip]
Saving to: ‘linux-6.4.10.tar.gz’
linux-6.4.10.tar.gz 100%[===========================================================================================================================================>] 211.38M 6.56MB/s in 38s
2023-08-21 10:03:29 (5.53 MB/s) - ‘linux-6.4.10.tar.gz’ saved [221647527/221647527]
[root@dl360-fedora kernels]#
Then we untar / gunzip
[root@dl360-fedora kernels]# tar xfz linux-6.4.10.tar.gz
Optionally, you may wish to copy an old config as basis
[root@dl360-fedora kernels]# find /boot/ | grep config
/boot/config-6.2.9-300.fc38.x86_64
/boot/config-6.4.10-200.fc38.x86_64
[root@dl360-fedora kernels]# cp /boot/config-6.4.10-200.fc38.x86_64 /usr/src/kernels/linux-6.4.10/.config
Now edit .config and ensure that CONFIG_ICE is not set
# CONFIG_ICE is not set
If it is then just comment it out.
Optionally, if you are also compiling the ptp_ocp driver add CONFIG_PTP_1588_CLOCK_OCP=m and the dependancies mentioned here
Now run:
[root@dl360-fedora linux-6.4.10]# make -j<however many CPU cores you have> bzImage
[root@dl360-fedora linux-6.4.10]# make -j12 modules
[root@dl360-fedora linux-6.4.10]# make -j12 install
[root@dl360-fedora linux-6.4.10]# make -j12 modules_install
After the last step reboot and startup on the new kernel (should happen automatically)
Now install DKMS
[root@dl360-fedora linux-6.4.10]# dnf install dkms -y
Then download the ice driver from Intel here and untar in /usr/src
[root@dl360-fedora src]# wget https://downloadmirror.intel.com/786081/ice-1.12.6.tar.gz
[root@dl360-fedora src]# tar xvfx ice-1.12.6.tar.gz
Now add a file in the ice-1.12.6 directory called dkms.conf containing the following
[root@dl360-fedora src]# cat ice-1.12.6/dkms.conf
# This works for me for dkms.conf
PACKAGE_NAME="ice"
PACKAGE_VERSION="1.12.6" #Use correct version
BUILT_MODULE_NAME[0]="ice"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/intel/ice/"
AUTOINSTALL="yes"
MAKE[0]="'make' -j12 -C src/"
BUILT_MODULE_LOCATION[0]="src/"
Now from /usr/src run (full output provided):
[root@dl360-fedora src]# dkms add ice/1.12.6
Creating symlink /var/lib/dkms/ice/1.12.6/source -> /usr/src/ice-1.12.6
[root@dl360-fedora src]# dkms build ice/1.12.6
Sign command: /lib/modules/6.4.10/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module:
Cleaning build area...(bad exit status: 2)
'make' -j12 -C src/.....
Signing module /var/lib/dkms/ice/1.12.6/build/src/ice.ko
Cleaning build area...(bad exit status: 2)
[root@dl360-fedora src]# dkms install ice/1.12.6
ice.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/6.4.10/extra/
depmod...
[root@dl360-fedora src]#
You can now install the module in the kernel and verify its loaded:
[root@dl360-fedora src]# modprobe ice
[root@dl360-fedora src]# lsmod | grep ice
ice 1835008 0
gnss 16384 1 ice
You can verify the PTP Hardware Clock (PHC) capability of the E810 if you have Timebeat installed using the Timebeat CLI:
[root@dl360-fedora src]# ssh -p 65129 admin@127.0.0.1
admin@127.0.0.1's password:
Welcome to Timebeat 2.0.2-enterprise CLI
Timebeat# show phc devices
-- PHC Devices --
<....>
Device index: 4
Interface name: ens2f0np0-ens2f1np1
PTP Hardware Clock: 5
Clock id: 4294967139
PTP_CLOCK_CAPS
max_adj : 100000000
n_alarm : 0
n_ext_ts : 3
n_per_out : 4
pps : 0
n_pins : 0
cross_timstamping: 0
Timebeat#
Where the n_ext_ts is greater than 0 you are "in business". How have fun with your PPS in/out capable Intel E810.