diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-07-03 16:51:18 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-07-05 18:50:46 +0300 |
commit | b5e56443f8e3c31524a1185d8c51a99472a88174 (patch) | |
tree | 3f3cdcdb3599c1cfb64c7da83cad6c198a5da0f0 /meta-phosphor/common/recipes-phosphor/watchdog | |
parent | a2e70d6983cfcfa2379ebdb68651d657e28c2f0b (diff) | |
download | openbmc-b5e56443f8e3c31524a1185d8c51a99472a88174.tar.xz |
Watchdog: Enable Host Watchdog during early poweron
Enabling the Host Watchdog during early power on was
inadvertently removed and this change is bringing that back on.
Fixes openbmc/openbmc#1888
Change-Id: Ib2220e762379360742dee4a11c06f01a6060fbbe
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/watchdog')
3 files changed, 21 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog.bb b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog.bb index ca5022ff8..dd018fb84 100644 --- a/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog.bb +++ b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog.bb @@ -34,8 +34,17 @@ OBMC_HOST_WATCHDOG_INSTANCES = "poweron" # This is really a DBUS service but the service name is # an argument, so making it this way. WATCHDOG_TMPL = "phosphor-watchdog@.service" +ENABLE_WATCHDOG_TMPL = "obmc-enable-host-watchdog@.service" SYSTEMD_SERVICE_${PN} += "${WATCHDOG_TMPL}" +# To Enable Host Watchdog early during poweron +SYSTEMD_SERVICE_${PN} += "${ENABLE_WATCHDOG_TMPL}" + WATCHDOG_TGTFMT = "phosphor-watchdog@{0}.service" +ENABLE_WATCHDOG_TGTFMT = "obmc-enable-host-watchdog@{0}.service" + WATCHDOG_FMT = "../${WATCHDOG_TMPL}:obmc-host-start@{1}.target.wants/${WATCHDOG_TGTFMT}" +ENABLE_WATCHDOG_FMT = "../${ENABLE_WATCHDOG_TMPL}:obmc-host-start@{0}.target.wants/${ENABLE_WATCHDOG_TGTFMT}" + SYSTEMD_LINK_${PN} += "${@compose_list(d, 'WATCHDOG_FMT', 'OBMC_HOST_WATCHDOG_INSTANCES', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'ENABLE_WATCHDOG_FMT', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service new file mode 100644 index 000000000..1fc88f332 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Start Watchdog%i +Wants=obmc-host-started@%i.target +After=obmc-host-started@%i.target +Wants=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service +After=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service +Conflicts=obmc-host-stop@%i.target + +[Service] +Type=oneshot +ExecStart={sbindir}/mapper call /xyz/openbmc_project/watchdog/host%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.State.Watchdog Enabled b true diff --git a/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf index 7399fa582..93e74e38b 100644 --- a/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf +++ b/meta-phosphor/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf @@ -1,2 +1,3 @@ [Unit] Conflicts=obmc-host-stop@0.target +Conflicts=obmc-chassis-poweroff@0.target |