From 3e7c9f152771b9e5fad83fdd4aa5bc3d88bb8645 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Sat, 6 Aug 2022 09:04:46 +0200 Subject: [PATCH] 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 [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 --- package/ntpsec/Config.in | 7 +++++++ package/ntpsec/ntpsec.mk | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/package/ntpsec/Config.in b/package/ntpsec/Config.in index c81673481e..3b20daecc7 100644 --- a/package/ntpsec/Config.in +++ b/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" diff --git a/package/ntpsec/ntpsec.mk b/package/ntpsec/ntpsec.mk index a0d0662947..ac4b90e37a 100644 --- a/package/ntpsec/ntpsec.mk +++ b/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