SYSTEMD-CONF: put watchdog configuration under switch

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
This commit is contained in:
Christophe Priouzeau 2019-05-02 11:05:34 +02:00
parent e07b4287ed
commit 1ec3bb66ba
2 changed files with 8 additions and 5 deletions

View File

@ -1,5 +0,0 @@
FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/${PN}:"
SRC_URI_append_stm32mpcommon = " \
file://0001-Enable-hardware-watchdog-inside-systemd.patch \
"

View File

@ -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
}