parent
cdd98f65c1
commit
d3ede24154
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/synce4l-ca51d5.tar.gz
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (synce4l-ca51d5.tar.gz) = e48e0cbf8eaf88725d552640ee819a41255f8eb040ee49a1ef8683465985b263363692ebf2a64f8e2ca521fa2ad1dcfe54b5e603aa63c5aab4a65c0f4def2c5d
|
27
synce4l.conf
Normal file
27
synce4l.conf
Normal file
@ -0,0 +1,27 @@
|
||||
[global]
|
||||
logging_level 6
|
||||
use_syslog 1
|
||||
verbose 0
|
||||
message_tag [synce4l]
|
||||
|
||||
[<synce1>]
|
||||
input_mode line
|
||||
network_option 1
|
||||
external_input_QL 11
|
||||
external_input_ext_QL 33
|
||||
extended_tlv 1
|
||||
recover_time 20
|
||||
eec_get_state_cmd cat /sys/class/net/eth0/device/cgu_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 3,4,7
|
||||
allowed_ext_qls 20,21
|
9
synce4l.service
Normal file
9
synce4l.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Synchronous Ethernet (SyncE) service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/synce4l -f /etc/synce4l.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
75
synce4l.spec
Normal file
75
synce4l.spec
Normal file
@ -0,0 +1,75 @@
|
||||
%global gitver ca51d51d27fb0c2b1ac0febe8600ffb6fbad160a
|
||||
%global gitrel %(c=%{gitver}; echo ${c:0:6})
|
||||
%global gitdate 20221114
|
||||
|
||||
Name: synce4l
|
||||
Version: 0
|
||||
Release: 3.%{gitdate}git%{gitrel}%{?dist}
|
||||
Summary: SyncE implementation for Linux
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://github.com/intel/synce4l
|
||||
Source0: https://github.com/intel/synce4l/archive/%{gitrel}/synce4l-%{gitrel}.tar.gz
|
||||
Source1: synce4l.service
|
||||
Source2: synce4l.conf
|
||||
|
||||
BuildRequires: gcc make systemd
|
||||
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
synce4l is a software implementation of Synchronous Ethernet (SyncE) according
|
||||
to ITU-T Recommendation G.8264. The design goal is to provide logic to
|
||||
supported hardware by processing Ethernet Synchronization Messaging Channel
|
||||
(ESMC) and control Ethernet Equipment Clock (EEC) on Network Card Interface
|
||||
(NIC).
|
||||
|
||||
%prep
|
||||
%setup -q -n synce4l-%{gitver}
|
||||
|
||||
%build
|
||||
%{make_build} \
|
||||
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
||||
EXTRA_LDFLAGS="$RPM_LD_FLAGS"
|
||||
|
||||
%install
|
||||
# make_install doesn't work here
|
||||
%makeinstall
|
||||
|
||||
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}
|
||||
|
||||
echo '.so man8/synce4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/synce4l.conf.5
|
||||
|
||||
%check
|
||||
./synce4l -h 2>&1 | grep 'usage:.*synce4l'
|
||||
|
||||
%post
|
||||
%systemd_post synce4l.service
|
||||
|
||||
%preun
|
||||
%systemd_preun synce4l.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart synce4l.service
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%config(noreplace) %{_sysconfdir}/synce4l.conf
|
||||
%{_unitdir}/synce4l.service
|
||||
%{_sbindir}/synce4l
|
||||
%{_mandir}/man5/*.5*
|
||||
%{_mandir}/man8/*.8*
|
||||
|
||||
%changelog
|
||||
* Wed Nov 16 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-3.20221114gitca51d5
|
||||
- update to 20221114gitca51d5 (#2141038)
|
||||
|
||||
* Thu Nov 10 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-2.20221108git079577
|
||||
- fix compiler warning (#2141038)
|
||||
- add simple test (#2141038)
|
||||
|
||||
* Tue Nov 08 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-1.20221108git079577
|
||||
- make initial release
|
Loading…
Reference in New Issue
Block a user