* [Buildroot] [PATCH 1/2] pps-tools: new package
@ 2014-10-15 20:37 Matt Weber
2014-10-15 20:37 ` [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd Matt Weber
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Matt Weber @ 2014-10-15 20:37 UTC (permalink / raw)
To: buildroot
From: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Added pps-tools package to add support to the ntpd for a
pps source (requires timepps.h from pps-tools as part of ntpd
build).
Signed-off-by: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
package/Config.in | 1 +
package/pps-tools/Config.in | 6 ++++++
package/pps-tools/pps-tools.mk | 28 ++++++++++++++++++++++++++++
3 files changed, 35 insertions(+)
create mode 100644 package/pps-tools/Config.in
create mode 100644 package/pps-tools/pps-tools.mk
diff --git a/package/Config.in b/package/Config.in
index 93e148d..8c109a5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -351,6 +351,7 @@ endif
source "package/parted/Config.in"
source "package/pciutils/Config.in"
source "package/picocom/Config.in"
+ source "package/pps-tools/Config.in"
source "package/pifmrds/Config.in"
source "package/read-edid/Config.in"
source "package/rng-tools/Config.in"
diff --git a/package/pps-tools/Config.in b/package/pps-tools/Config.in
new file mode 100644
index 0000000..83308f4
--- /dev/null
+++ b/package/pps-tools/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PPS_TOOLS
+ bool "pps-tools"
+ help
+ Pulse per second tools. Provides timepps.h and other PPS utilities.
+
+ https://github.com/ago/pps-tools/
diff --git a/package/pps-tools/pps-tools.mk b/package/pps-tools/pps-tools.mk
new file mode 100644
index 0000000..4ebfb1e
--- /dev/null
+++ b/package/pps-tools/pps-tools.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# pps-tools
+#
+################################################################################
+PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8
+PPS_TOOLS_SITE = https://github.com/ago/pps-tools.git
+PPS_TOOLS_SITE_METHOD = git
+PPS_TOOLS_INSTALL_STAGING = YES
+PPS_TOOLS_LICENSE = GPLv2
+PPS_TOOLS_LICENSE_FILES = COPYING
+
+define PPS_TOOLS_BUILD_CMDS
+ $(MAKE) CC=$(TARGET_CC) -C $(@D) all
+endef
+
+define PPS_TOOLS_INSTALL_STAGING_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/timepps.h $(STAGING_DIR)/usr/include/timepps.h
+endef
+
+define PPS_TOOLS_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/ppsctl $(TARGET_DIR)/usr/bin/ppsctl
+ $(INSTALL) -D -m 0755 $(@D)/ppsfind $(TARGET_DIR)/usr/bin/ppsfind
+ $(INSTALL) -D -m 0755 $(@D)/ppstest $(TARGET_DIR)/usr/bin/ppstest
+ $(INSTALL) -D -m 0755 $(@D)/ppswatch $(TARGET_DIR)/usr/bin/ppswatch
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd
2014-10-15 20:37 [Buildroot] [PATCH 1/2] pps-tools: new package Matt Weber
@ 2014-10-15 20:37 ` Matt Weber
2014-10-16 9:30 ` Thomas Petazzoni
2014-10-16 9:24 ` [Buildroot] [PATCH 1/2] pps-tools: new package Thomas Petazzoni
2014-10-16 13:44 ` Ryan Barnett
2 siblings, 1 reply; 5+ messages in thread
From: Matt Weber @ 2014-10-15 20:37 UTC (permalink / raw)
To: buildroot
From: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Added an option for the ntpd application to support pps inputs.
Signed-off-by: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
package/ntp/Config.in | 7 +++++++
package/ntp/ntp.mk | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/package/ntp/Config.in b/package/ntp/Config.in
index 858a9ad..7722757 100644
--- a/package/ntp/Config.in
+++ b/package/ntp/Config.in
@@ -34,6 +34,13 @@ config BR2_PACKAGE_NTP_NTPD
system date and time in sync and optionally serving time and date
information on the network via the NTP protocol.
+config BR2_PACKAGE_NTP_NTPD_ATOM_PPS
+ bool "ntpd-pps"
+ depends on BR2_PACKAGE_NTP_NTPD
+ select BR2_PACKAGE_PPS_TOOLS
+ help
+ Compile ntpd with the ability to use an ATOM PPS source.
+
config BR2_PACKAGE_NTP_NTPDATE
bool "ntpdate"
help
diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
index 7c2cb8e..51598ba 100644
--- a/package/ntp/ntp.mk
+++ b/package/ntp/ntp.mk
@@ -34,6 +34,11 @@ else
NTP_CONF_OPTS += --without-ntpsnmpd
endif
+ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y)
+ NTP_CONF_OPTS += --enable-ATOM
+ NTP_DEPENDENCIES += pps-tools
+endif
+
define NTP_PATCH_FIXUPS
$(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," $(@D)/ntpd/refclock_pcf.c
$(SED) '/[[:space:](]rindex[[:space:]]*(/s/[[:space:]]*rindex[[:space:]]*(/ strrchr(/g' $(@D)/ntpd/*.c
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd
2014-10-15 20:37 ` [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd Matt Weber
@ 2014-10-16 9:30 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-16 9:30 UTC (permalink / raw)
To: buildroot
Dear Matt Weber,
On Wed, 15 Oct 2014 15:37:55 -0500, Matt Weber wrote:
> +config BR2_PACKAGE_NTP_NTPD_ATOM_PPS
> + bool "ntpd-pps"
I'd use "PPS support" here instead.
> + depends on BR2_PACKAGE_NTP_NTPD
> + select BR2_PACKAGE_PPS_TOOLS
> + help
> + Compile ntpd with the ability to use an ATOM PPS source.
> +
> config BR2_PACKAGE_NTP_NTPDATE
> bool "ntpdate"
> help
> diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
> index 7c2cb8e..51598ba 100644
> --- a/package/ntp/ntp.mk
> +++ b/package/ntp/ntp.mk
> @@ -34,6 +34,11 @@ else
> NTP_CONF_OPTS += --without-ntpsnmpd
> endif
>
> +ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y)
> + NTP_CONF_OPTS += --enable-ATOM
> + NTP_DEPENDENCIES += pps-tools
> +endif
Can you add the corresponding:
else
NTP_CONF_OPTS += --disable-ATOM
endif
We like to be explicit about configuration options when possible.
With that fixed, you can resend this patch with my:
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(I did built test this).
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] pps-tools: new package
2014-10-15 20:37 [Buildroot] [PATCH 1/2] pps-tools: new package Matt Weber
2014-10-15 20:37 ` [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd Matt Weber
@ 2014-10-16 9:24 ` Thomas Petazzoni
2014-10-16 13:44 ` Ryan Barnett
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-16 9:24 UTC (permalink / raw)
To: buildroot
Dear Matt Weber,
On Wed, 15 Oct 2014 15:37:54 -0500, Matt Weber wrote:
> diff --git a/package/pps-tools/pps-tools.mk b/package/pps-tools/pps-tools.mk
> new file mode 100644
> index 0000000..4ebfb1e
> --- /dev/null
> +++ b/package/pps-tools/pps-tools.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# pps-tools
> +#
> +################################################################################
One empty new line needed here.
> +PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8
> +PPS_TOOLS_SITE = https://github.com/ago/pps-tools.git
> +PPS_TOOLS_SITE_METHOD = git
> +PPS_TOOLS_INSTALL_STAGING = YES
> +PPS_TOOLS_LICENSE = GPLv2
License is GPLv2+.
> +PPS_TOOLS_LICENSE_FILES = COPYING
> +
> +define PPS_TOOLS_BUILD_CMDS
> + $(MAKE) CC=$(TARGET_CC) -C $(@D) all
Use $(TARGET_CONFIGURE_OPTS) instead of CC=$(TARGET_CC), so that CFLAGS
and al. are also passed.
> +endef
> +
> +define PPS_TOOLS_INSTALL_STAGING_CMDS
> + $(INSTALL) -D -m 0644 $(@D)/timepps.h $(STAGING_DIR)/usr/include/timepps.h
> +endef
> +
> +define PPS_TOOLS_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/ppsctl $(TARGET_DIR)/usr/bin/ppsctl
> + $(INSTALL) -D -m 0755 $(@D)/ppsfind $(TARGET_DIR)/usr/bin/ppsfind
> + $(INSTALL) -D -m 0755 $(@D)/ppstest $(TARGET_DIR)/usr/bin/ppstest
> + $(INSTALL) -D -m 0755 $(@D)/ppswatch $(TARGET_DIR)/usr/bin/ppswatch
> +endef
Use the "make install" target of the pps-tools Makefile instead. There
is just one issue with it in that it doesn't create the destination
directories where it copies the header file and the executable. Fix
this either by adding a patch (which should be submitted upstream),
or doing something like:
mkdir -p $(TARGET_DIR)/usr/include/sys $(TARGET_DIR)/usr/bin
before doing the make install. And ditto for the staging installation,
of course.
We prefer to use the package built-in "make install" logic so that if
we bump the package version later, we won't forget to install other new
things that the package should now install.
Other than that, I've built-tested your patch with a minimal ARM
configuration, and it worked fine.
Can you fix those issues and resubmit?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] pps-tools: new package
2014-10-15 20:37 [Buildroot] [PATCH 1/2] pps-tools: new package Matt Weber
2014-10-15 20:37 ` [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd Matt Weber
2014-10-16 9:24 ` [Buildroot] [PATCH 1/2] pps-tools: new package Thomas Petazzoni
@ 2014-10-16 13:44 ` Ryan Barnett
2 siblings, 0 replies; 5+ messages in thread
From: Ryan Barnett @ 2014-10-16 13:44 UTC (permalink / raw)
To: buildroot
Matt,
On Wed, Oct 15, 2014 at 3:37 PM, Matt Weber
<matthew.weber@rockwellcollins.com> wrote:
[...]
> diff --git a/package/pps-tools/pps-tools.mk b/package/pps-tools/pps-tools.mk
> new file mode 100644
> index 0000000..4ebfb1e
> --- /dev/null
> +++ b/package/pps-tools/pps-tools.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# pps-tools
> +#
> +################################################################################
> +PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8
> +PPS_TOOLS_SITE = https://github.com/ago/pps-tools.git
> +PPS_TOOLS_SITE_METHOD = git
Does the github helper work for downloading this package? I think it
is prefer to use the git hub helper as described in the manual at
http://buildroot.org/downloads/manual/manual.html#github-download-url
Thanks,
-Ryan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-16 13:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15 20:37 [Buildroot] [PATCH 1/2] pps-tools: new package Matt Weber
2014-10-15 20:37 ` [Buildroot] [PATCH 2/2] ntp: Adding pps support to ntpd Matt Weber
2014-10-16 9:30 ` Thomas Petazzoni
2014-10-16 9:24 ` [Buildroot] [PATCH 1/2] pps-tools: new package Thomas Petazzoni
2014-10-16 13:44 ` Ryan Barnett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox