diff --git a/recipes-core/systemd/systemd-conf/0001-Enable-hardware-watchdog-inside-systemd.patch b/recipes-core/systemd/systemd-conf/0001-Enable-hardware-watchdog-inside-systemd.patch deleted file mode 100644 index 5359a5f..0000000 --- a/recipes-core/systemd/systemd-conf/0001-Enable-hardware-watchdog-inside-systemd.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 00d191a63ebc27ba5bc9f796f6dc7843e4a8d379 Mon Sep 17 00:00:00 2001 -From: christophe montaud -Date: Wed, 16 May 2018 13:50:17 +0200 -Subject: [PATCH] Enable hardware watchdog inside systemd - ---- - src/core/system.conf | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/core/system.conf.in b/src/core/system.conf.in -index f0a59a7..e5f5aaa 100644 ---- a/src/core/system.conf.in -+++ b/src/core/system.conf.in -@@ -24,8 +24,8 @@ - #CtrlAltDelBurstAction=reboot-force - #CPUAffinity=1 2 - #JoinControllers=cpu,cpuacct net_cls,net_prio --#RuntimeWatchdogSec=0 --#ShutdownWatchdogSec=10min -+RuntimeWatchdogSec=30 -+ShutdownWatchdogSec=5min - #CapabilityBoundingSet= - #NoNewPrivileges=no - #SystemCallArchitectures= --- -2.7.4 - diff --git a/recipes-core/systemd/systemd-conf_241.bbappend b/recipes-core/systemd/systemd-conf_241.bbappend deleted file mode 100644 index 9a38aad..0000000 --- a/recipes-core/systemd/systemd-conf_241.bbappend +++ /dev/null @@ -1,8 +0,0 @@ - -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 -} diff --git a/recipes-core/systemd/systemd-conf_243.bbappend b/recipes-core/systemd/systemd-conf_243.bbappend new file mode 100644 index 0000000..892371b --- /dev/null +++ b/recipes-core/systemd/systemd-conf_243.bbappend @@ -0,0 +1,9 @@ +do_install_append_stm32mpcommon() { + # enable watchdog on systemd configuration + if ${@bb.utils.contains('MACHINE_FEATURES','watchdog','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system.conf.d/ + echo "[Manager]" > ${D}${systemd_unitdir}/system.conf.d/01-watchdog.conf + echo "RuntimeWatchdogSec=120" >> ${D}${systemd_unitdir}/system.conf.d/01-watchdog.conf + echo "ShutdownWatchdogSec=2min" >> ${D}${systemd_unitdir}/system.conf.d/01-watchdog.conf + fi +}