mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] gptp: add new package for IEEE1588
@ 2016-02-15 22:39 Robert Schwebel
  2016-02-16 11:30 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Schwebel @ 2016-02-15 22:39 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel, Steffen Trumtrar

This adds the linuxptp project. The original ptxdist rules have been
written by Steffen Trumtrar.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
[clean up rules, add license, version bump to 1.6]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 projectroot/etc/gPTP.conf | 28 ++++++++++++++++++++++
 rules/linuxptp.in         |  9 ++++++++
 rules/linuxptp.make       | 59 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 projectroot/etc/gPTP.conf
 create mode 100644 rules/linuxptp.in
 create mode 100644 rules/linuxptp.make

diff --git a/projectroot/etc/gPTP.conf b/projectroot/etc/gPTP.conf
new file mode 100644
index 0000000..5bbbaf2
--- /dev/null
+++ b/projectroot/etc/gPTP.conf
@@ -0,0 +1,28 @@
+[global]
+#
+# Run time options
+#
+assume_two_step         1
+logging_level           6
+path_trace_enabled      1
+follow_up_info          1
+tx_timestamp_timeout    40
+use_syslog              1
+verbose                 0
+summary_interval        0
+#
+# Transport options
+#
+transportSpecific       0x1
+ptp_dst_mac             01:80:C2:00:00:0E
+p2p_dst_mac             01:80:C2:00:00:0E
+uds_address             /var/run/ptp4l
+#
+# Default interface options
+#
+network_transport       L2
+delay_mechanism         P2P
+time_stamping           hardware
+
+[eth0]
+
diff --git a/rules/linuxptp.in b/rules/linuxptp.in
new file mode 100644
index 0000000..ca19914
--- /dev/null
+++ b/rules/linuxptp.in
@@ -0,0 +1,9 @@
+## SECTION=networking
+
+config LINUXPTP
+	tristate
+	prompt "linuxptp"
+	help
+	  The Linux PTP project implements the Precision Time protocol (PTP),
+          standardized as IEEE1588.
+
diff --git a/rules/linuxptp.make b/rules/linuxptp.make
new file mode 100644
index 0000000..33f20b0
--- /dev/null
+++ b/rules/linuxptp.make
@@ -0,0 +1,59 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Steffen Trumtrar <s.trumtrar@pengutronix.de>
+#           (C) 2016 by Robert Schwebel <r.schwebel@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LINUXPTP) += linuxptp
+
+#
+# Paths and names
+#
+LINUXPTP_VERSION	:= 1.6
+LINUXPTP_MD5		:= 6aa15d83f5a35f1fd076ba9adc4e7285
+LINUXPTP		:= linuxptp-$(LINUXPTP_VERSION)
+LINUXPTP_SUFFIX		:= tgz
+LINUXPTP_URL		:= $(call ptx/mirror, SF, linuxptp/$(LINUXPTP).$(LINUXPTP_SUFFIX))
+LINUXPTP_SOURCE		:= $(SRCDIR)/$(LINUXPTP).$(LINUXPTP_SUFFIX)
+LINUXPTP_DIR		:= $(BUILDDIR)/$(LINUXPTP)
+LINUXPTP_LICENSE	:= GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LINUXPTP_CONF_TOOL	:= NO
+LINUXPTP_MAKE_OPT	:= $(CROSS_ENV_PROGS)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/linuxptp.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, linuxptp)
+	@$(call install_fixup, linuxptp,PRIORITY,optional)
+	@$(call install_fixup, linuxptp,SECTION,base)
+	@$(call install_fixup, linuxptp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
+	@$(call install_fixup, linuxptp,DESCRIPTION,missing)
+
+	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/ptp4l, /sbin/ptp4l)
+	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/phc2sys, /sbin/phc2sys)
+	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/pmc, /sbin/pmc)
+	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/hwstamp_ctl, /sbin/hwstamp_ctl)
+	@$(call install_alternative, linuxptp, 0, 0, 0644, /etc/gPTP.conf)
+
+	@$(call install_finish, linuxptp)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.7.0.rc3


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] gptp: add new package for IEEE1588
  2016-02-15 22:39 [ptxdist] [PATCH] gptp: add new package for IEEE1588 Robert Schwebel
@ 2016-02-16 11:30 ` Michael Olbrich
  2016-02-16 11:54   ` Robert Schwebel
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2016-02-16 11:30 UTC (permalink / raw)
  To: ptxdist

On Mon, Feb 15, 2016 at 11:39:32PM +0100, Robert Schwebel wrote:
> This adds the linuxptp project. The original ptxdist rules have been
> written by Steffen Trumtrar.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> [clean up rules, add license, version bump to 1.6]
> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
>  projectroot/etc/gPTP.conf | 28 ++++++++++++++++++++++
>  rules/linuxptp.in         |  9 ++++++++
>  rules/linuxptp.make       | 59 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 96 insertions(+)
>  create mode 100644 projectroot/etc/gPTP.conf
>  create mode 100644 rules/linuxptp.in
>  create mode 100644 rules/linuxptp.make
> 
> diff --git a/projectroot/etc/gPTP.conf b/projectroot/etc/gPTP.conf
> new file mode 100644
> index 0000000..5bbbaf2
> --- /dev/null
> +++ b/projectroot/etc/gPTP.conf
> @@ -0,0 +1,28 @@
> +[global]
> +#
> +# Run time options
> +#
> +assume_two_step         1
> +logging_level           6
> +path_trace_enabled      1
> +follow_up_info          1
> +tx_timestamp_timeout    40
> +use_syslog              1
> +verbose                 0
> +summary_interval        0
> +#
> +# Transport options
> +#
> +transportSpecific       0x1
> +ptp_dst_mac             01:80:C2:00:00:0E
> +p2p_dst_mac             01:80:C2:00:00:0E
> +uds_address             /var/run/ptp4l
> +#
> +# Default interface options
> +#
> +network_transport       L2
> +delay_mechanism         P2P
> +time_stamping           hardware
> +
> +[eth0]
> +
> diff --git a/rules/linuxptp.in b/rules/linuxptp.in
> new file mode 100644
> index 0000000..ca19914
> --- /dev/null
> +++ b/rules/linuxptp.in
> @@ -0,0 +1,9 @@
> +## SECTION=networking
> +
> +config LINUXPTP
> +	tristate
> +	prompt "linuxptp"
> +	help
> +	  The Linux PTP project implements the Precision Time protocol (PTP),
> +          standardized as IEEE1588.
> +
> diff --git a/rules/linuxptp.make b/rules/linuxptp.make
> new file mode 100644
> index 0000000..33f20b0
> --- /dev/null
> +++ b/rules/linuxptp.make
> @@ -0,0 +1,59 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2015 by Steffen Trumtrar <s.trumtrar@pengutronix.de>
> +#           (C) 2016 by Robert Schwebel <r.schwebel@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LINUXPTP) += linuxptp
> +
> +#
> +# Paths and names
> +#
> +LINUXPTP_VERSION	:= 1.6
> +LINUXPTP_MD5		:= 6aa15d83f5a35f1fd076ba9adc4e7285
> +LINUXPTP		:= linuxptp-$(LINUXPTP_VERSION)
> +LINUXPTP_SUFFIX		:= tgz
> +LINUXPTP_URL		:= $(call ptx/mirror, SF, linuxptp/$(LINUXPTP).$(LINUXPTP_SUFFIX))
> +LINUXPTP_SOURCE		:= $(SRCDIR)/$(LINUXPTP).$(LINUXPTP_SUFFIX)
> +LINUXPTP_DIR		:= $(BUILDDIR)/$(LINUXPTP)
> +LINUXPTP_LICENSE	:= GPL-2.0
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LINUXPTP_CONF_TOOL	:= NO
> +LINUXPTP_MAKE_OPT	:= $(CROSS_ENV_PROGS)

LINUXPTP_MAKE_OPT	:= \
	$(CROSS_ENV_PROGS)
	prefix=/usr

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/linuxptp.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, linuxptp)
> +	@$(call install_fixup, linuxptp,PRIORITY,optional)
> +	@$(call install_fixup, linuxptp,SECTION,base)
> +	@$(call install_fixup, linuxptp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
> +	@$(call install_fixup, linuxptp,DESCRIPTION,missing)
> +
> +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/ptp4l, /sbin/ptp4l)

	@$(call install_copy, linuxptp, 0, 0, 0755, -, /sbin/ptp4l)

for all. Unless there is a reason for prefix=/ ?

mol

> +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/phc2sys, /sbin/phc2sys)
> +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/pmc, /sbin/pmc)
> +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/hwstamp_ctl, /sbin/hwstamp_ctl)
> +	@$(call install_alternative, linuxptp, 0, 0, 0644, /etc/gPTP.conf)
> +
> +	@$(call install_finish, linuxptp)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.7.0.rc3
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] gptp: add new package for IEEE1588
  2016-02-16 11:30 ` Michael Olbrich
@ 2016-02-16 11:54   ` Robert Schwebel
  2016-02-16 15:16     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Schwebel @ 2016-02-16 11:54 UTC (permalink / raw)
  To: ptxdist

Hi Michael,

On Tue, Feb 16, 2016 at 12:30:35PM +0100, Michael Olbrich wrote:
> > +# ----------------------------------------------------------------------------
> > +# Prepare
> > +# ----------------------------------------------------------------------------
> > +
> > +LINUXPTP_CONF_TOOL	:= NO
> > +LINUXPTP_MAKE_OPT	:= $(CROSS_ENV_PROGS)
> 
> LINUXPTP_MAKE_OPT	:= \
> 	$(CROSS_ENV_PROGS)
> 	prefix=/usr

The makefile declares prefix with "=" and thus overwrites this, so it
doesn't have an effect.

> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/linuxptp.targetinstall:
> > +	@$(call targetinfo)
> > +
> > +	@$(call install_init, linuxptp)
> > +	@$(call install_fixup, linuxptp,PRIORITY,optional)
> > +	@$(call install_fixup, linuxptp,SECTION,base)
> > +	@$(call install_fixup, linuxptp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
> > +	@$(call install_fixup, linuxptp,DESCRIPTION,missing)
> > +
> > +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/ptp4l, /sbin/ptp4l)
> 
> 	@$(call install_copy, linuxptp, 0, 0, 0755, -, /sbin/ptp4l)
> 
> for all. Unless there is a reason for prefix=/ ?

The issue above results in the files being installed into /usr/local/*
anyway, which is the reason why the paths are set explicitly here.

Shall I patch the makefile to accept prefix=?

What do you think is the best place for the binaries: /sbin or
/usr/sbin?

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] gptp: add new package for IEEE1588
  2016-02-16 11:54   ` Robert Schwebel
@ 2016-02-16 15:16     ` Michael Olbrich
  2016-02-16 19:15       ` Robert Schwebel
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2016-02-16 15:16 UTC (permalink / raw)
  To: ptxdist

Hi,

On Tue, Feb 16, 2016 at 12:54:33PM +0100, Robert Schwebel wrote:
> On Tue, Feb 16, 2016 at 12:30:35PM +0100, Michael Olbrich wrote:
> > > +# ----------------------------------------------------------------------------
> > > +# Prepare
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +LINUXPTP_CONF_TOOL	:= NO
> > > +LINUXPTP_MAKE_OPT	:= $(CROSS_ENV_PROGS)
> > 
> > LINUXPTP_MAKE_OPT	:= \
> > 	$(CROSS_ENV_PROGS)
> > 	prefix=/usr
> 
> The makefile declares prefix with "=" and thus overwrites this, so it
> doesn't have an effect.

Wrong. Variables set via make arguments (and not environment variables)
overwrite variables set in the makefile.

> > > +# ----------------------------------------------------------------------------
> > > +# Target-Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/linuxptp.targetinstall:
> > > +	@$(call targetinfo)
> > > +
> > > +	@$(call install_init, linuxptp)
> > > +	@$(call install_fixup, linuxptp,PRIORITY,optional)
> > > +	@$(call install_fixup, linuxptp,SECTION,base)
> > > +	@$(call install_fixup, linuxptp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
> > > +	@$(call install_fixup, linuxptp,DESCRIPTION,missing)
> > > +
> > > +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/ptp4l, /sbin/ptp4l)
> > 
> > 	@$(call install_copy, linuxptp, 0, 0, 0755, -, /sbin/ptp4l)
> > 
> > for all. Unless there is a reason for prefix=/ ?
> 
> The issue above results in the files being installed into /usr/local/*
> anyway, which is the reason why the paths are set explicitly here.
> 
> Shall I patch the makefile to accept prefix=?
> 
> What do you think is the best place for the binaries: /sbin or
> /usr/sbin?

I prefer /usr/sbin/.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] gptp: add new package for IEEE1588
  2016-02-16 15:16     ` Michael Olbrich
@ 2016-02-16 19:15       ` Robert Schwebel
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2016-02-16 19:15 UTC (permalink / raw)
  To: ptxdist

On Tue, Feb 16, 2016 at 04:16:28PM +0100, Michael Olbrich wrote:
> On Tue, Feb 16, 2016 at 12:54:33PM +0100, Robert Schwebel wrote:
> > On Tue, Feb 16, 2016 at 12:30:35PM +0100, Michael Olbrich wrote:
> > > > +# ----------------------------------------------------------------------------
> > > > +# Prepare
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +LINUXPTP_CONF_TOOL	:= NO
> > > > +LINUXPTP_MAKE_OPT	:= $(CROSS_ENV_PROGS)
> > > 
> > > LINUXPTP_MAKE_OPT	:= \
> > > 	$(CROSS_ENV_PROGS)
> > > 	prefix=/usr
> > 
> > The makefile declares prefix with "=" and thus overwrites this, so it
> > doesn't have an effect.
> 
> Wrong. Variables set via make arguments (and not environment variables)
> overwrite variables set in the makefile.

True, I found the reason why it was ignored. In fact, it wasn't, but we
also have to set the variable manually on 'make install', not only on
'make'.
 
> > > > +# ----------------------------------------------------------------------------
> > > > +# Target-Install
> > > > +# ----------------------------------------------------------------------------
> > > > +
> > > > +$(STATEDIR)/linuxptp.targetinstall:
> > > > +	@$(call targetinfo)
> > > > +
> > > > +	@$(call install_init, linuxptp)
> > > > +	@$(call install_fixup, linuxptp,PRIORITY,optional)
> > > > +	@$(call install_fixup, linuxptp,SECTION,base)
> > > > +	@$(call install_fixup, linuxptp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
> > > > +	@$(call install_fixup, linuxptp,DESCRIPTION,missing)
> > > > +
> > > > +	@$(call install_copy, linuxptp, 0, 0, 0755, $(LINUXPTP_DIR)/ptp4l, /sbin/ptp4l)
> > > 
> > > 	@$(call install_copy, linuxptp, 0, 0, 0755, -, /sbin/ptp4l)
> > > 
> > > for all. Unless there is a reason for prefix=/ ?
> > 
> > The issue above results in the files being installed into /usr/local/*
> > anyway, which is the reason why the paths are set explicitly here.
> > 
> > Shall I patch the makefile to accept prefix=?
> > 
> > What do you think is the best place for the binaries: /sbin or
> > /usr/sbin?
> 
> I prefer /usr/sbin/.

Thanks, I've sent a v2.

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-02-16 19:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 22:39 [ptxdist] [PATCH] gptp: add new package for IEEE1588 Robert Schwebel
2016-02-16 11:30 ` Michael Olbrich
2016-02-16 11:54   ` Robert Schwebel
2016-02-16 15:16     ` Michael Olbrich
2016-02-16 19:15       ` Robert Schwebel

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