diff options
author | jmbills <jason.m.bills@intel.com> | 2021-10-04 22:42:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 22:42:48 +0300 |
commit | 0c9e31989c615598b5d042ffab385606660c93c0 (patch) | |
tree | 8019999b0ca042482e5193d6cabc06220c71d776 /meta-openbmc-mods/meta-common/recipes-phosphor/watchdog | |
parent | 04cd92067d2481643df5010cb39b2134b648cf4d (diff) | |
parent | ffe6d597d9e3d4407cf8062b5d6505a80ce08f41 (diff) | |
download | openbmc-0c9e31989c615598b5d042ffab385606660c93c0.tar.xz |
Update
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog')
4 files changed, 25 insertions, 30 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb index d6ff9f7a4..706e08646 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog.bb @@ -25,7 +25,7 @@ DEPENDS += " \ boost \ " -RDEPENDS_${PN} += " \ +RDEPENDS:${PN} += " \ libsystemd \ sdbusplus \ phosphor-logging \ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch index 07ac95c89..48bc4a086 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch @@ -1,4 +1,4 @@ -From 5760937ef1ae9a4610b47ba64fdebe594fc2c9df Mon Sep 17 00:00:00 2001 +From a7d1d3770a650df8fe61d594885fcb388ac2ca42 Mon Sep 17 00:00:00 2001 From: James Feist <james.feist@linux.intel.com> Date: Mon, 17 Jun 2019 12:00:58 -0700 Subject: [PATCH] Customize phosphor-watchdog for Intel platforms @@ -22,30 +22,26 @@ Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com> %% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch --- - src/watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++--- - src/watchdog.hpp | 23 ++++- - 2 files changed, 242 insertions(+), 11 deletions(-) + src/watchdog.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++++--- + src/watchdog.hpp | 22 ++++- + 2 files changed, 240 insertions(+), 11 deletions(-) diff --git a/src/watchdog.cpp b/src/watchdog.cpp -index 57e905059153..1204db4cab0f 100644 +index 7de98ae3e70f..f96faebc7368 100644 --- a/src/watchdog.cpp +++ b/src/watchdog.cpp -@@ -1,11 +1,14 @@ - #include "watchdog.hpp" - -+#include <systemd/sd-journal.h> -+ - #include <algorithm> - #include <chrono> +@@ -5,8 +5,10 @@ #include <phosphor-logging/elog.hpp> #include <phosphor-logging/log.hpp> #include <sdbusplus/exception.hpp> ++#include <systemd/sd-journal.h> + #include <string_view> #include <xyz/openbmc_project/Common/error.hpp> +#include <xyz/openbmc_project/State/Host/server.hpp> namespace phosphor { -@@ -18,10 +21,86 @@ using namespace phosphor::logging; +@@ -19,10 +21,86 @@ using namespace phosphor::logging; using sdbusplus::exception::SdBusError; using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; @@ -136,7 +132,7 @@ index 57e905059153..1204db4cab0f 100644 void Watchdog::resetTimeRemaining(bool enableWatchdog) { -@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value) +@@ -108,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value) // Optional callback function on timer expiration void Watchdog::timeOutHandler() { @@ -249,7 +245,7 @@ index 57e905059153..1204db4cab0f 100644 auto target = actionTargetMap.find(action); if (target == actionTargetMap.end()) -@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler() +@@ -147,12 +323,45 @@ void Watchdog::timeOutHandler() try { @@ -301,16 +297,15 @@ index 57e905059153..1204db4cab0f 100644 catch (const SdBusError& e) { diff --git a/src/watchdog.hpp b/src/watchdog.hpp -index 7de9bb38419c..b004b7ab4e3f 100644 +index 736e71f68fcc..79158f192f40 100644 --- a/src/watchdog.hpp +++ b/src/watchdog.hpp -@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits - WatchdogInherits(bus, objPath), +@@ -73,7 +73,17 @@ class Watchdog : public WatchdogInherits bus(bus), actionTargetMap(std::move(actionTargetMap)), fallback(std::move(fallback)), minInterval(minInterval), -- timer(event, std::bind(&Watchdog::timeOutHandler, this)) -+ timer(event, std::bind(&Watchdog::timeOutHandler, this)), -+ powerStateChangedSignal( + timer(event, std::bind(&Watchdog::timeOutHandler, this)), +- objPath(objPath) ++ objPath(objPath), powerStateChangedSignal( + bus, + sdbusplus::bus::match::rules::propertiesChanged( + "/xyz/openbmc_project/state/host0", @@ -322,9 +317,9 @@ index 7de9bb38419c..b004b7ab4e3f 100644 + powerStateChangedHandler(props); + }) { - // We set the watchdog interval with the default value. - interval(interval()); -@@ -77,6 +88,12 @@ class Watchdog : public WatchdogInherits + // Use default if passed in otherwise just use default that comes + // with object +@@ -90,6 +100,12 @@ class Watchdog : public WatchdogInherits tryFallbackOrDisable(); } @@ -337,7 +332,7 @@ index 7de9bb38419c..b004b7ab4e3f 100644 /** @brief Resets the TimeRemaining to the configured Interval * Optionally enables the watchdog. * -@@ -165,6 +182,10 @@ class Watchdog : public WatchdogInherits +@@ -178,6 +194,10 @@ class Watchdog : public WatchdogInherits /** @brief Contained timer object */ sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic> timer; diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend index 75f04e2ab..ad2984fa9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend @@ -1,8 +1,8 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" SRC_URI += "file://0001-Customize-phosphor-watchdog-for-Intel-platforms.patch \ " # Remove the override to keep service running after DC cycle -SYSTEMD_OVERRIDE_${PN}_remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf" -SYSTEMD_SERVICE_${PN} = "phosphor-watchdog.service" +SYSTEMD_OVERRIDE_${PN}:remove = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf" +SYSTEMD_SERVICE:${PN} = "phosphor-watchdog.service" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb index addd1ccb2..b5724710e 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb @@ -8,5 +8,5 @@ inherit obmc-phosphor-systemd LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" -SYSTEMD_SERVICE_${PN} += "system-watchdog.service" +SYSTEMD_SERVICE:${PN} += "system-watchdog.service" SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf" |