summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2022-05-27 00:07:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-31 15:24:18 +0100
commit00400b63578bc1544af27d45ac7367343cf60113 (patch)
tree1fef1343f3be7e171d0ec378126dc07a8825f1c2 /meta/recipes-core/systemd
parentadd49bc7e0910ba36230937389836f7de1acd757 (diff)
downloadpoky-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-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd_250.5.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb
index 006b2f86ea..6fac27ee56 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_250.5.bb
@@ -238,6 +238,9 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
238 -Dnologin-path=${base_sbindir}/nologin \ 238 -Dnologin-path=${base_sbindir}/nologin \
239 -Dumount-path=${base_bindir}/umount" 239 -Dumount-path=${base_bindir}/umount"
240 240
241# The 60 seconds is watchdog's default vaule.
242WATCHDOG_TIMEOUT ??= "60"
243
241do_install() { 244do_install() {
242 meson_do_install 245 meson_do_install
243 install -d ${D}/${base_sbindir} 246 install -d ${D}/${base_sbindir}
@@ -337,6 +340,11 @@ do_install() {
337 340
338 # add a profile fragment to disable systemd pager with busybox less 341 # add a profile fragment to disable systemd pager with busybox less
339 install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh 342 install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh
343
344 if [ -n "${WATCHDOG_TIMEOUT}" ]; then
345 sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \
346 ${D}/${sysconfdir}/systemd/system.conf
347 fi
340} 348}
341 349
342python populate_packages:prepend (){ 350python populate_packages:prepend (){