Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd: Add WATCHDOG_RUNTIME_SEC optional variable
@ 2024-12-19 11:16 egyszeregy
  2024-12-19 11:31 ` Patchtest results for " patchtest
  2025-01-08 15:14 ` [OE-core] " Ross Burton
  0 siblings, 2 replies; 4+ messages in thread
From: egyszeregy @ 2024-12-19 11:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Benjamin Szőke

	s=20181004; d=freemail.hu;

	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;

	l=1751; bh=SOtVjpovb8GEQjj/6PhL652jcamo2arPKAPsCBAMAC4=;

	b=zmfZNqw1S+s5YL85QDtiX5EGp84S7r1i8qrxR6Ehp3UIZzqiicCTn4k6qBs8A/fh

	0AUTtZZWyFcBvE9P9NU636rQpR/PQ36AlqughUhps3uc4VtBlrSLS2OohIBGCptREdc

	it9VhTWZgOc3xbKZDb0LEmdwRSzP4wVn9IVvY1GDX1YA0MUvXFeLnVSzybvqLygbTMB

	RhHRAVakbL8+xakvUC+5+bbaZ0Ewn/qx9YIpZ2wUqhxnHDB1Z5pD1UqR77jSybUPNLs

	l9srkJar4ywaEJiMDTzIRAHCXV16F+kyrvQowG+lEWNDt1xhCRY5XY/Dcj/jHt4sDUO

	jyWyaMXngw==
Content-Transfer-Encoding: quoted-printable

From: Benjamin Sz=C5=91ke <egyszeregy@freemail.hu>

To make use of the hardware watchdog it is sufficient to set
the RuntimeWatchdogSec=3D option in /etc/systemd/system.conf.
It defaults to 0 (i.e. no hardware watchdog use). Set it to
a value like 20s and the watchdog is enabled.

ref: https://0pointer.de/blog/projects/watchdog.html
Signed-off-by: Benjamin Sz=C5=91ke <egyszeregy@freemail.hu>
---
 meta/recipes-core/systemd/systemd_256.9.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_256.9.bb b/meta/recipes-co=
re/systemd/systemd_256.9.bb
index a9224915c6..84888b88f1 100644
--- a/meta/recipes-core/systemd/systemd_256.9.bb
+++ b/meta/recipes-core/systemd/systemd_256.9.bb
@@ -266,6 +266,11 @@ EXTRA_OEMESON +=3D "-Dkexec-path=3D${sbindir}/kexec =
\
 # The 60 seconds is watchdog's default vaule.
 WATCHDOG_TIMEOUT ??=3D "60"
=20
+# To make use of the hardware watchdog it is sufficient to set WATCHDOG_=
RUNTIME_SEC
+# (RuntimeWatchdogSec=3D option in /etc/systemd/system.conf) to a value =
like 20s
+# and the watchdog is enabled. (defaults is no hardware watchdog use)
+WATCHDOG_RUNTIME_SEC ??=3D ""
+
 do_install() {
 	meson_do_install
=20
@@ -383,6 +388,11 @@ do_install() {
 			${D}/${sysconfdir}/systemd/system.conf
 	fi
=20
+	if [ -n "${WATCHDOG_RUNTIME_SEC}" ]; then
+		sed -i -e 's/#RuntimeWatchdogSec=3Doff/RuntimeWatchdogSec=3D${WATCHDOG=
_RUNTIME_SEC}/' \
+			${D}/${sysconfdir}/systemd/system.conf
+	fi
+
 	if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', =
d)}; then
 		if ! grep -q '^NamePolicy=3D.*mac' ${D}${nonarch_libdir}/systemd/netwo=
rk/99-default.link; then
 			sed -i '/^NamePolicy=3D/s/$/ mac/' ${D}${nonarch_libdir}/systemd/netw=
ork/99-default.link
--=20
2.47.1.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-08 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 11:16 [PATCH] systemd: Add WATCHDOG_RUNTIME_SEC optional variable egyszeregy
2024-12-19 11:31 ` Patchtest results for " patchtest
2024-12-29 14:36   ` Livius
2025-01-08 15:14 ` [OE-core] " Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox