Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/linuxptp: remove hardcoded interface from config to args
@ 2020-05-20  5:16 Heiko Thiery
  2020-05-20  6:26 ` Michael Walle
  2020-05-21 13:36 ` Thomas Petazzoni
  0 siblings, 2 replies; 16+ messages in thread
From: Heiko Thiery @ 2020-05-20  5:16 UTC (permalink / raw)
  To: buildroot

Interface configuration is hard coded in the config file. This will
throw an error when this interace (eth0) is not present.

This patch removes the interface to be used from the config and appends it
to the PTP4L_ARGS. With this the custom arguments can be set via
/etc/defaults/ptp4l.

Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/linuxptp/S65ptp4l      | 2 +-
 package/linuxptp/linuxptp.cfg  | 2 --
 package/linuxptp/ptp4l.service | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/linuxptp/S65ptp4l b/package/linuxptp/S65ptp4l
index 1b9e3c9300..f888c1026c 100644
--- a/package/linuxptp/S65ptp4l
+++ b/package/linuxptp/S65ptp4l
@@ -7,7 +7,7 @@ DAEMON="ptp4l"
 
 PIDFILE="/var/run/$DAEMON.pid"
 
-PTP4L_ARGS="-f /etc/linuxptp.cfg"
+PTP4L_ARGS="-f /etc/linuxptp.cfg -i eth0"
 
 # shellcheck source=/dev/null
 [ -r "/etc/default/ptp4l" ] && . "/etc/default/ptp4l"
diff --git a/package/linuxptp/linuxptp.cfg b/package/linuxptp/linuxptp.cfg
index f9d02e8d97..376fc85ac7 100644
--- a/package/linuxptp/linuxptp.cfg
+++ b/package/linuxptp/linuxptp.cfg
@@ -15,5 +15,3 @@ delay_mechanism		Auto
 network_transport	UDPv4
 time_stamping		hardware
 step_threshold		1.0
-
-[eth0]
diff --git a/package/linuxptp/ptp4l.service b/package/linuxptp/ptp4l.service
index 07f0b68fad..fb39ee3d94 100644
--- a/package/linuxptp/ptp4l.service
+++ b/package/linuxptp/ptp4l.service
@@ -6,7 +6,7 @@ Wants=time-sync.target
 Wants=phc2sys.service
 
 [Service]
-ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg
+ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg -i eth0
 Restart=always
 
 [Install]
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-06-27 18:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20  5:16 [Buildroot] [PATCH 1/1] package/linuxptp: remove hardcoded interface from config to args Heiko Thiery
2020-05-20  6:26 ` Michael Walle
2020-05-21 13:36 ` Thomas Petazzoni
2020-05-21 20:52   ` Heiko Thiery
2020-05-25  7:40     ` Thomas Petazzoni
2020-05-25  9:10       ` Heiko Thiery
2020-05-21 21:21   ` Michael Walle
2020-05-25  9:06     ` Heiko Thiery
2020-05-27  6:51     ` Heiko Thiery
2020-06-15 11:35       ` Heiko Thiery
2020-06-16 19:07         ` Vladimir Oltean
2020-06-18 15:02           ` Heiko Thiery
2020-06-18 16:09           ` Michael Walle
2020-06-18 17:00             ` Vladimir Oltean
2020-06-18 21:20               ` Michael Walle
2020-06-27 18:51                 ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox