diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog')
9 files changed, 7 insertions, 83 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 2ffb40431..d6ff9f7a4 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 @@ -20,10 +20,8 @@ inherit pkgconfig DEPENDS += " \ systemd \ sdbusplus \ - sdbusplus-native \ phosphor-logging \ phosphor-dbus-interfaces \ - phosphor-dbus-interfaces-native \ boost \ " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp index 792e564d9..bae54f335 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/frb2-watchdog/frb2-watchdog.cpp @@ -20,6 +20,13 @@ #include <sys/types.h> #include <unistd.h> +#include <boost/asio/buffers_iterator.hpp> +#include <boost/asio/deadline_timer.hpp> +#include <boost/asio/io_service.hpp> +#include <boost/asio/ip/tcp.hpp> +#include <boost/asio/posix/stream_descriptor.hpp> +#include <boost/asio/read_until.hpp> +#include <boost/asio/streambuf.hpp> #include <boost/container/flat_set.hpp> #include <cassert> #include <cstdint> 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 deleted file mode 100644 index fc6e1034a..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "System watchdog" -DESCRIPTION = "BMC hardware watchdog service that is used to reset BMC \ - when unrecoverable events occurs" - -inherit allarch -inherit obmc-phosphor-systemd - -RDEPENDS_${PN} = "bash" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -SYSTEMD_SERVICE_${PN} += "system-watchdog.service" -SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf" - -SYSTEMD_SERVICE_${PN} += "watchdog-reset@.service" -SYSTEMD_SERVICE_${PN} += "watchdog-clear-failures.service" -SYSTEMD_SERVICE_${PN} += "watchdog-clear-failures.timer" -SRC_URI += "file://watchdog-reset.sh" - -do_install_append(){ - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/watchdog-reset.sh ${D}${bindir} -} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/obmc/system-watchdog/system-watchdog.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/obmc/system-watchdog/system-watchdog.conf deleted file mode 100644 index defe830a1..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/obmc/system-watchdog/system-watchdog.conf +++ /dev/null @@ -1,3 +0,0 @@ -TIMEOUT=60 -INTERVAL=10 -DEVICE=/dev/watchdog1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/system-watchdog.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/system-watchdog.service deleted file mode 100644 index 1564fda20..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/system-watchdog.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=BMC Hardware Watchdog Daemon - -[Service] -EnvironmentFile=/etc/default/obmc/system-watchdog/system-watchdog.conf -ExecStart=/sbin/watchdog -T ${{TIMEOUT}} -t ${{INTERVAL}} -F ${{DEVICE}} -KillSignal=SIGKILL - -[Install] -WantedBy=basic.target - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service deleted file mode 100644 index 801f4ed27..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Reset BMC Hardware Watchdog Failure Count - -[Service] -ExecStart=busctl call xyz.openbmc_project.U_Boot.Environment.Manager \ - /xyz/openbmc_project/u_boot/environment/mgr \ - xyz.openbmc_project.U_Boot.Environment.Manager \ - Write ss bootfailures 0 -Type=oneshot - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer deleted file mode 100644 index 1abac4326..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Starts the clear watchdog serivce after 30 minutes - -[Timer] -OnBootSec=30min - -[Install] -WantedBy=timers.target diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh deleted file mode 100644 index 3413fdb9f..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -echo "Watchdog being started by $1" > /dev/kmsg - -if /sbin/fw_printenv bootfailures -n | grep -q 3; then - exit 0 # passed boot limit, user started again on purpose -fi - -if test -f "/tmp/nowatchdog"; then - echo "Not resetting due to nowatchdog file" > /dev/kmsg - exit 0 -fi - -echo "Log as follows:" > /dev/kmsg -journalctl -r -n 100 | while read line; do echo $line > /dev/kmsg; done - -systemctl stop system-watchdog.service -/sbin/watchdog -T 0 -F /dev/watchdog1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service deleted file mode 100644 index 6b1ebc544..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Reset BMC Using Hardware Watchdog - -[Service] -ExecStart=/usr/bin/watchdog-reset.sh %i -Type=oneshot - |