meta-ibm: Add a chrony configuration file
The huygens machine is based on the new pstbmc machine family from IBM.
It will be our first redundant BMC system [1]. This new system expects
to have chrony daemon to run along with the existing systemd-
timesyncd deamon.
The commit adds a custom chrony configuration file in order to
achieve syncing of time between redundant BMCs.
[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/70233
Tested: Configuration file is updated.
Change-Id: I6fb6787055bdfc423ef439c43b9c17db679d062f
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/meta-ibm/recipes-support/chrony/chrony/huygens/chrony.conf b/meta-ibm/recipes-support/chrony/chrony/huygens/chrony.conf
new file mode 100644
index 0000000..4d93116
--- /dev/null
+++ b/meta-ibm/recipes-support/chrony/chrony/huygens/chrony.conf
@@ -0,0 +1,44 @@
+# Load config files matching the /etc/chrony/conf.d/*.conf pattern.
+confdir /etc/chrony/conf.d
+
+# Use a local timeserver in preference to the pool, if it's reachable.
+server master iburst
+
+# Sync to pulse-per-second from an onboard GPS.
+#refclock PPS /dev/pps0 poll 0 prefer
+# You'll want to enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO in your kernel,
+# and an entry something like this in your device tree:
+# pps {
+# compatible = "pps-gpio";
+# gpios = <&ps7_gpio_0 56 0>;
+# };
+
+# Load source files matching the /etc/chrony/sources.d/*.sources pattern.
+# These can be reloaded using 'chronyc reload sources'.
+sourcedir /etc/chrony/sources.d
+
+# In first three updates step the system clock instead of slew
+# if the adjustment is larger than 1 second.
+makestep 1.0 3
+
+# Record the rate at which the system clock gains/loses time,
+# improving accuracy after reboot
+driftfile /var/lib/chrony/drift
+
+# Allow NTP client access from local network.
+# This value can be changed based on the IP address range of the redundant BMCs.
+allow 10
+
+# Serve time even if not synchronized to any NTP server.
+local stratum 8
+
+# Specify directory for log files.
+logdir /var/log/chrony
+
+# Enable clients to make it easier to track it and keep their clocks close
+# together even when large offset or frequency corrections are applied to
+# the server’s clock.
+smoothtime 20 0.01
+
+# Select which information is logged.
+#log measurements statistics tracking
diff --git a/meta-ibm/recipes-support/chrony/chrony_%.bbappend b/meta-ibm/recipes-support/chrony/chrony_%.bbappend
index d32a79d..1e88511 100644
--- a/meta-ibm/recipes-support/chrony/chrony_%.bbappend
+++ b/meta-ibm/recipes-support/chrony/chrony_%.bbappend
@@ -2,9 +2,11 @@
install_chrony_configuration() {
install -D -m 0644 ${WORKDIR}/chronyd.service ${D}${systemd_system_unitdir}/chronyd.service
+ install -m 644 -D ${WORKDIR}/chrony.conf ${D}${sysconfdir}/chrony.conf
}
SRC_URI:append:df-chrony = " file://chronyd.service"
+SRC_URI:append:df-chrony = " file://chrony.conf"
do_install:append:huygens() {
install_chrony_configuration
}