Skip to contentSkip to conversation

pps-tools: new package

PATCH New Matt Weber 3 participants 4 messages Oct 16, 2014 – Oct 19, 2014

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH v3 1/2 pps-tools: new package

From: Bryan Brinsko <[email protected]>

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).

---
Changes v2 -> v3
- Cleaned up make env/opts (Suggested Thomas P)

Changes v1 -> v2
- Adjusted newlines (Suggested Thomas P)
- Updated license to GPLv2+ (Suggested Thomas P)
- Build cmd to use config opts env (Suggested Thomas P)
- Install step to use pkg install (Suggested Thomas P)
- Github helper for download (Suggested Ryan B)

 package/Config.in              |  1 +
 package/pps-tools/Config.in    |  6 ++++++
 package/pps-tools/pps-tools.mk | 27 +++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 package/pps-tools/Config.in
 create mode 100644 package/pps-tools/pps-tools.mk
package/Config.in +1 -0
index 93e148d..8c109a5 100644
@@ -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"
package/pps-tools/Config.in new file +6 -0
new file mode 100644
index 0000000..83308f4
@@ -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/
package/pps-tools/pps-tools.mk new file +27 -0
new file mode 100644
index 0000000..7c09e6a
@@ -0,0 +1,27 @@
+################################################################################
+#
+# pps-tools
+#
+################################################################################
+
+PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8
+PPS_TOOLS_SITE = $(call github,ago,pps-tools,$(PPS_TOOLS_VERSION))
+PPS_TOOLS_INSTALL_STAGING = YES
+PPS_TOOLS_LICENSE = GPLv2+
+PPS_TOOLS_LICENSE_FILES = COPYING
+
+define PPS_TOOLS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+endef
+
+define PPS_TOOLS_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/include/sys $(STAGING_DIR)/usr/bin
+	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
+endef
+
+define PPS_TOOLS_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/include/sys $(TARGET_DIR)/usr/bin
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v3 2/2 ntp: Adding pps support to ntpd

From: Bryan Brinsko <[email protected]>

Added an option for the ntpd application to support pps inputs.

---
Changes v1 -> v2
- Updated Config.in option description (Suggested Thomas P)
- Added conf opts to disable PPS when not selected (Suggested Thomas P)

 package/ntp/Config.in | 7 +++++++
 package/ntp/ntp.mk    | 7 +++++++
 2 files changed, 14 insertions(+)
package/ntp/Config.in +7 -0
index 858a9ad..c92ae93 100644
@@ -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 "PPS support"
+	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
package/ntp/ntp.mk +7 -0
index 7c2cb8e..bb950a1 100644
@@ -34,6 +34,13 @@ else
 	NTP_CONF_OPTS += --without-ntpsnmpd
 endif
 
+ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y)
+	NTP_CONF_OPTS += --enable-ATOM
+	NTP_DEPENDENCIES += pps-tools
+else
+	NTP_CONF_OPTS += --disable-ATOM
+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
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 1/2 pps-tools: new package

In reply to Matt Weber

Hi Matt,

Quoted 32 lines

From: Bryan Brinsko <[email protected]>

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).

---
Changes v2 -> v3
- Cleaned up make env/opts (Suggested Thomas P)

Changes v1 -> v2
- Adjusted newlines (Suggested Thomas P)
- Updated license to GPLv2+ (Suggested Thomas P)
- Build cmd to use config opts env (Suggested Thomas P)
- Install step to use pkg install (Suggested Thomas P)
- Github helper for download (Suggested Ryan B)

  package/Config.in              |  1 +
  package/pps-tools/Config.in    |  6 ++++++
  package/pps-tools/pps-tools.mk | 27 +++++++++++++++++++++++++++
  3 files changed, 34 insertions(+)

create mode 100644 package/pps-tools/Config.in create mode 100644 package/pps-tools/pps-tools.mk

package/Config.in +0 -0
index 93e148d..8c109a5 100644

package/Config.in endif · line 354

Quoted 4 lines
package/Config.in +1 -0
@@ -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"

This should be alphabetically ordered.

Regards,
Jerzy

Quoted 48 lines
package/Config.in +0 -0
  	source "package/pifmrds/Config.in"
  	source "package/read-edid/Config.in"
  	source "package/rng-tools/Config.in"
package/pps-tools/Config.in new file +6 -0
new file mode 100644
index 0000000..83308f4
@@ -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/
package/pps-tools/pps-tools.mk new file +27 -0
new file mode 100644
index 0000000..7c09e6a
@@ -0,0 +1,27 @@
+################################################################################
+#
+# pps-tools
+#
+################################################################################
+
+PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8
+PPS_TOOLS_SITE = $(call github,ago,pps-tools,$(PPS_TOOLS_VERSION))
+PPS_TOOLS_INSTALL_STAGING = YES
+PPS_TOOLS_LICENSE = GPLv2+
+PPS_TOOLS_LICENSE_FILES = COPYING
+
+define PPS_TOOLS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+endef
+
+define PPS_TOOLS_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/include/sys $(STAGING_DIR)/usr/bin
+	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
+endef
+
+define PPS_TOOLS_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/include/sys $(TARGET_DIR)/usr/bin
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+$(eval $(generic-package))
#3 lore raw

PATCH v3 1/2 pps-tools: new package

In reply to Matt Weber

Dear Matt Weber,

Quoted 8 lines · Matt Weber

From: Bryan Brinsko <[email protected]>

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).

Both patches applied. On this first patch, I've fixed the alphabetic ordering as noticed by Jerzy, and I've added $(TARGET_MAKE_ENV) to the $(MAKE) invocations in the install commands.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com