diff options
| author | Benjamin Szőke <egyszeregy@freemail.hu> | 2024-12-19 12:16:15 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-08 13:25:11 +0000 |
| commit | 7f9b94a8a29bb3c173e90c0f702d7b752085b5a4 (patch) | |
| tree | 36dc27e8efb1667e1c129cc09820546124783c39 /meta | |
| parent | ac546d219636b4808e6ef1905fcb0ed647210ea6 (diff) | |
| download | poky-7f9b94a8a29bb3c173e90c0f702d7b752085b5a4.tar.gz | |
systemd: Add WATCHDOG_RUNTIME_SEC optional variable
To make use of the hardware watchdog it is sufficient to set
the RuntimeWatchdogSec= 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
(From OE-Core rev: 1c61a1eb9c4faa9ab32b0440bbdd88c22c3cd945)
Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/systemd/systemd_257.1.bb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_257.1.bb b/meta/recipes-core/systemd/systemd_257.1.bb index 9f9c83a7c3..8330157fb6 100644 --- a/meta/recipes-core/systemd/systemd_257.1.bb +++ b/meta/recipes-core/systemd/systemd_257.1.bb | |||
| @@ -265,6 +265,11 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | |||
| 265 | # The 60 seconds is watchdog's default vaule. | 265 | # The 60 seconds is watchdog's default vaule. |
| 266 | WATCHDOG_TIMEOUT ??= "60" | 266 | WATCHDOG_TIMEOUT ??= "60" |
| 267 | 267 | ||
| 268 | # To make use of the hardware watchdog it is sufficient to set WATCHDOG_RUNTIME_SEC | ||
| 269 | # (RuntimeWatchdogSec= option in /etc/systemd/system.conf) to a value like 20s | ||
| 270 | # and the watchdog is enabled. (defaults is no hardware watchdog use) | ||
| 271 | WATCHDOG_RUNTIME_SEC ??= "" | ||
| 272 | |||
| 268 | do_install() { | 273 | do_install() { |
| 269 | meson_do_install | 274 | meson_do_install |
| 270 | 275 | ||
| @@ -382,6 +387,11 @@ do_install() { | |||
| 382 | ${D}/${sysconfdir}/systemd/system.conf | 387 | ${D}/${sysconfdir}/systemd/system.conf |
| 383 | fi | 388 | fi |
| 384 | 389 | ||
| 390 | if [ -n "${WATCHDOG_RUNTIME_SEC}" ]; then | ||
| 391 | sed -i -e 's/#RuntimeWatchdogSec=off/RuntimeWatchdogSec=${WATCHDOG_RUNTIME_SEC}/' \ | ||
| 392 | ${D}/${sysconfdir}/systemd/system.conf | ||
| 393 | fi | ||
| 394 | |||
| 385 | if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then | 395 | if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then |
| 386 | if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then | 396 | if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then |
| 387 | sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link | 397 | sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
