From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Nov 2024 09:10:21 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tFUAm-0007bZ-32 for lore@lore.pengutronix.de; Mon, 25 Nov 2024 09:10:21 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tFUAn-0007EP-6O; Mon, 25 Nov 2024 09:10:21 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tFUAS-0007E7-Ok; Mon, 25 Nov 2024 09:10:00 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tFUAR-00030A-2d; Mon, 25 Nov 2024 09:10:00 +0100 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1tFUAR-001azB-2q; Mon, 25 Nov 2024 09:10:00 +0100 From: Ahmad Fatoum To: ptxdist@pengutronix.de Date: Mon, 25 Nov 2024 09:09:58 +0100 Message-Id: <20241125080958.380467-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] chrony: fix use of PHC and PTP reference clocks X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Ahmad Fatoum Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Passing --disable-pps to ./configure doesn't matter if we unconditionally disable all reference clock support anyway[1]. All of refclock, phc and pps are enabled by default, so let's add options for refclock and phc that allow disabling them and add the proper dependencies, so both CHRONY_PPS_REFCLK and CHRONY_PHC_REFCLK can actually work. [1]: https://gitlab.com/chrony/chrony/-/blob/4.6/configure?ref_type=tags#L773-794 Fixes: 2531a1942ed6 ("chrony: enable support for PPS devices") Signed-off-by: Ahmad Fatoum --- rules/chrony.in | 13 +++++++++++++ rules/chrony.make | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/rules/chrony.in b/rules/chrony.in index 67a87277fc84..49226f58efba 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -45,13 +45,26 @@ config CHRONY_ADVANCED_COMMAND This allows getting advanced NTP time synchronization status monitoring from the service. +config CHRONY_REFCLK + bool + prompt "Enable reference clock support" + config CHRONY_PPS_REFCLK bool + select CHRONY_REFCLK prompt "Enable support for PPS devices" help Pulse per second devices signal the start of every second with high precision. +config CHRONY_PHC_REFCLK + bool + select CHRONY_REFCLK + prompt "Enable support for PHC devices" + help + PTP hardware clock devices signal the start of every second + with high precision. + comment "install options ---" config CHRONY_INSTALL_CHRONY_COMMAND diff --git a/rules/chrony.make b/rules/chrony.make index 33050fc2f858..647b78272020 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -50,8 +50,8 @@ CHRONY_CONF_OPT := \ --without-tomcrypt \ $(call ptx/ifdef, PTXCONF_CHRONY_ADVANCED_COMMAND,,--disable-cmdmon) \ $(call ptx/ifdef, PTXCONF_CHRONY_ADVANCED_COMMAND,--enable-debug,) \ - --disable-refclock \ - --disable-phc \ + $(call ptx/ifdef, PTXCONF_CHRONY_REFCLK,,--disable-refclock) \ + $(call ptx/ifdef, PTXCONF_CHRONY_PHC_REFCLK,,--disable-phc) \ $(call ptx/ifdef, PTXCONF_CHRONY_PPS_REFCLK,,--disable-pps) \ $(call ptx/ifdef, PTXCONF_GLOBAL_IPV6,,--disable-ipv6) \ --with-user=$(call ptx/ifdef, PTXCONF_INITMETHOD_SYSTEMD,chrony,root) \ -- 2.39.5