From 1ec3bb66ba98617e0774e66eb02393390772356a Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Thu, 2 May 2019 11:05:34 +0200 Subject: [PATCH] SYSTEMD-CONF: put watchdog configuration under switch Signed-off-by: Christophe Priouzeau --- recipes-core/systemd/systemd-conf.bbappend | 5 ----- recipes-core/systemd/systemd-conf_241.bbappend | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 recipes-core/systemd/systemd-conf.bbappend create mode 100644 recipes-core/systemd/systemd-conf_241.bbappend diff --git a/recipes-core/systemd/systemd-conf.bbappend b/recipes-core/systemd/systemd-conf.bbappend deleted file mode 100644 index 2f2012b..0000000 --- a/recipes-core/systemd/systemd-conf.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:" - -SRC_URI_append_stm32mpcommon = " \ - file://0001-Enable-hardware-watchdog-inside-systemd.patch \ - " diff --git a/recipes-core/systemd/systemd-conf_241.bbappend b/recipes-core/systemd/systemd-conf_241.bbappend new file mode 100644 index 0000000..9a38aad --- /dev/null +++ b/recipes-core/systemd/systemd-conf_241.bbappend @@ -0,0 +1,8 @@ + +do_install_append_stm32mpcommon() { + # enable watchdog on systemd configuration + if ${@bb.utils.contains('MACHINE_FEATURES','watchdog','true','false',d)}; then + sed -e 's|^[#]*RuntimeWatchdogSec.*|RuntimeWatchdogSec=30|g' -i ${D}${sysconfdir}/systemd/system.conf + sed -e 's|^[#]*ShutdownWatchdogSec.*|ShutdownWatchdogSec=5min|g' -i ${D}${sysconfdir}/systemd/system.conf + fi +}