From 1a910edfbf56f798e7656de33d12a4161f8ff141 Mon Sep 17 00:00:00 2001 From: BonnieLo-wiwynn Date: Mon, 6 Feb 2023 13:43:45 +0800 Subject: meta-phosphor: support hardware watchdog Support hardware watchdog for openbmc. Added systemd config to enable '/dev/watchdog'. Tested: tested and verified on greatlakes platform. Change-Id: Ic46bcd9b8576530be7dcdda51384e1052d4a78f1 Signed-off-by: Delphine CC Chiu --- .../recipes-core/systemd/systemd/40-hardware-watchdog.conf | 3 +++ meta-phosphor/recipes-core/systemd/systemd_%.bbappend | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 meta-phosphor/recipes-core/systemd/systemd/40-hardware-watchdog.conf (limited to 'meta-phosphor/recipes-core') diff --git a/meta-phosphor/recipes-core/systemd/systemd/40-hardware-watchdog.conf b/meta-phosphor/recipes-core/systemd/systemd/40-hardware-watchdog.conf new file mode 100644 index 0000000000..c323a22d7c --- /dev/null +++ b/meta-phosphor/recipes-core/systemd/systemd/40-hardware-watchdog.conf @@ -0,0 +1,3 @@ +[Manager] +RuntimeWatchdogSec=120s +WatchdogDevice=/dev/watchdog diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend index 847d3248e5..eab2ad4cd5 100644 --- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend +++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend @@ -25,6 +25,19 @@ FILES:${PN}-catalog-extralocales = "\ ${exec_prefix}/lib/systemd/catalog/*.*.catalog \ " +SRC_URI:append = " \ + file://40-hardware-watchdog.conf \ + " + +FILES:${PN}:append = " \ + ${systemd_unitdir}/system.conf.d/40-hardware-watchdog.conf \ + " + +do_install:append() { + install -d -m 0755 ${D}${systemd_unitdir}/system.conf.d/ + install -m 0644 ${WORKDIR}/40-hardware-watchdog.conf ${D}${systemd_unitdir}/system.conf.d/ +} + # udev is added to the USERADD_PACKAGES due to some 'render' group # being necessary to create for /dev/dri handling, which we don't # have to worry about. A side-effect of this is udev would RDEPEND on -- cgit v1.2.3