switch default config to use kernel DPLL API

It will be available in linux-6.7.
This commit is contained in:
Miroslav Lichvar 2023-11-06 12:09:35 +01:00
parent 9feccbca4b
commit b84e8cdf80
2 changed files with 8 additions and 29 deletions

View File

@ -1,27 +0,0 @@
[global]
logging_level 6
use_syslog 1
verbose 0
message_tag [synce4l]
[<synce1>]
input_mode line
network_option 1
external_input_QL 0x2
external_input_ext_QL 0x20
extended_tlv 1
recover_time 20
eec_get_state_cmd cat /sys/class/net/eth0/device/dpll_0_state
eec_holdover_value 4
eec_locked_ho_value 3
eec_locked_value 2
eec_freerun_value 1
eec_invalid_value 0
[eth0]
tx_heartbeat_msec 1000
rx_heartbeat_msec 500
recover_clock_enable_cmd echo 1 0 > /sys/class/net/eth0/device/phy/synce
recover_clock_disable_cmd echo 0 0 > /sys/class/net/eth0/device/phy/synce
allowed_qls 0x2,0x4,0x8
allowed_ext_qls 0x20,0x21

View File

@ -7,7 +7,6 @@ License: GPL-2.0-or-later
URL: https://github.com/intel/synce4l
Source0: https://github.com/intel/synce4l/archive/%{version}/synce4l-%{version}.tar.gz
Source1: synce4l.service
Source2: synce4l.conf
BuildRequires: gcc make systemd
BuildRequires: libnl3-devel
@ -24,6 +23,13 @@ supported hardware by processing Ethernet Synchronization Messaging Channel
%prep
%autosetup
sed \
-e 's|^\(logging_level *\)[0-7]|\16|' \
-e 's|^\(use_syslog *\)[01]|\11|' \
-e 's|^\(verbose *\)[01]|\10|' \
< configs/synce4l_dpll.cfg > synce4l.conf
touch -r configs/synce4l_dpll.cfg synce4l.conf
%build
%{make_build} \
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
@ -35,7 +41,7 @@ supported hardware by processing Ethernet Synchronization Messaging Channel
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},%{_unitdir},%{_mandir}/man5}
install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
install -m 644 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
install -m 644 -p synce4l.conf $RPM_BUILD_ROOT%{_sysconfdir}
echo '.so man8/synce4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/synce4l.conf.5