@@ -253,6 +253,11 @@ WATCHDOG_TIMEOUT ??= "60"
# and the watchdog is enabled. (defaults is no hardware watchdog use)
WATCHDOG_RUNTIME_SEC ??= ""
+# If a different device, other then /dev/watchdog0 should be used, set
+# WATCHDOG_DEVICE_PATH to the full path to the watchdog device.
+# (Will set the WatchdogDevice= option in /etc/systemd/system.conf)
+WATCHDOG_DEVICE_PATH ??= ""
+
do_install() {
meson_do_install
@@ -368,6 +373,11 @@ do_install() {
${D}/${sysconfdir}/systemd/system.conf
fi
+ if [ -n "${WATCHDOG_DEVICE_PATH}" ]; then
+ sed -i -e 's|#WatchdogDevice=|WatchdogDevice=${WATCHDOG_DEVICE_PATH}|' \
+ ${D}/${sysconfdir}/systemd/system.conf
+ fi
+
# Actively disable Predictable Network Interface Names
if ! ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then
sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link
Some systems may have multiple watchdogs and want systemd to manage a different one. This patch allows to set the WatchdogDevice setting in system.conf Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de> --- meta/recipes-core/systemd/systemd_259.5.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)