Pārlūkot izejas kodu

package/ntpsec: enable refclock support

Enable --refclocks=all configure flag, to be able to use several
synchronization sources (hardware).

Refclocks are all disabled by default, and they can only be enabled,
either one by one by name, or globally. Except for PPS support that
needs pps-tools, the other refcloks do not have external dependencies,
so we choose to enable all or none, without fine-grained selection.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
[yann.morin.1998@free.fr:
  - change comment and commit to explain refclock can't be disabled
  - don't add a menu-endmenu
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Guillaume W. Bres 3 gadi atpakaļ
vecāks
revīzija
3e7c9f1527
2 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 7 0
      package/ntpsec/Config.in
  2. 6 0
      package/ntpsec/ntpsec.mk

+ 7 - 0
package/ntpsec/Config.in

@@ -29,6 +29,13 @@ config BR2_PACKAGE_NTPSEC_NTS
 	help
 	  Enable Network Time Security (NTS) support.
 
+config BR2_PACKAGE_NTPSEC_REFCLOCK_ALL
+	bool "refclock-all"
+	select BR2_PACKAGE_PPS_TOOLS
+	help
+	  Enable all refclocks (hardware, sync source and discplined
+	  clocks)
+
 endif
 
 comment "ntpsec needs a toolchain w/ wchar, threads, dynamic library"

+ 6 - 0
package/ntpsec/ntpsec.mk

@@ -53,6 +53,12 @@ ifeq ($(BR2_PACKAGE_NTPSEC_NTS),)
 NTPSEC_CONF_OPTS += --disable-nts
 endif
 
+# refclocks are disabled by default, can only be enabled
+ifeq ($(BR2_PACKAGE_NTPSEC_REFCLOCK_ALL),y)
+NTPSEC_DEPENDENCIES += pps-tools
+NTPSEC_CONF_OPTS += --refclock=all
+endif
+
 define NTPSEC_INSTALL_NTPSEC_CONF
 	$(INSTALL) -m 644 package/ntpsec/ntpd.etc.conf $(TARGET_DIR)/etc/ntp.conf
 endef