diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2022-05-27 00:07:11 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-31 15:24:18 +0100 |
| commit | 00400b63578bc1544af27d45ac7367343cf60113 (patch) | |
| tree | 1fef1343f3be7e171d0ec378126dc07a8825f1c2 /meta/recipes-extended | |
| parent | add49bc7e0910ba36230937389836f7de1acd757 (diff) | |
| download | poky-00400b63578bc1544af27d45ac7367343cf60113.tar.gz | |
systemd: Set RebootWatchdogSec to 60s as watchdog
The systemd-shutdown sets watchdog timeout to 10m (600 seconds) which is too
large, and caused errors when reboot on boars such as rpi4:
systemd-shutdown[1]: Failed to set timeout to 10min: Invalid argument
The watchog's default value is 60s, so set RebootWatchdogSec to 60s to fix the
errors. And <machin.conf> can set WATCHDOG_TIMEOUT when needed, for example,
the max timeout of rpi4 is 15 seconds.
(From OE-Core rev: 20a7ab9ff6ed777c6617a338d049ebe03fcc588c)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
| -rw-r--r-- | meta/recipes-extended/watchdog/watchdog-config.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-extended/watchdog/watchdog-config.bb b/meta/recipes-extended/watchdog/watchdog-config.bb index a28d28033b..f138952128 100644 --- a/meta/recipes-extended/watchdog/watchdog-config.bb +++ b/meta/recipes-extended/watchdog/watchdog-config.bb | |||
| @@ -13,8 +13,15 @@ SRC_URI = " \ | |||
| 13 | file://watchdog.conf \ | 13 | file://watchdog.conf \ |
| 14 | " | 14 | " |
| 15 | 15 | ||
| 16 | # The default value is 60 seconds when null. | ||
| 17 | WATCHDOG_TIMEOUT ??= "" | ||
| 18 | |||
| 16 | do_install() { | 19 | do_install() { |
| 17 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog | 20 | install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog |
| 18 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf | 21 | install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf |
| 22 | |||
| 23 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then | ||
| 24 | echo "watchdog-timeout = ${WATCHDOG_TIMEOUT}" >> ${D}/etc/watchdog.conf | ||
| 25 | fi | ||
| 19 | } | 26 | } |
| 20 | 27 | ||
