Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,14 @@
[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
ConditionPathExists=!/run/openbmc/host@%i-on
[Service]
Type=oneshot
ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/watchdog/host%i` /xyz/openbmc_project/watchdog/host%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.State.Watchdog Enabled b true"
RemainAfterExit=yes
SyslogIdentifier=obmc-enable-host-watchdog
@@ -0,0 +1,4 @@
DEVPATH=/xyz/openbmc_project/watchdog/host0
SERVICE=xyz.openbmc_project.Watchdog
TARGET=obmc-host-timeout@0.target
TIMEOUT_IN_MSEC=30000
@@ -0,0 +1,7 @@
[Unit]
Description=Phosphor %I watchdog
[Service]
Restart=no
EnvironmentFile={envfiledir}/obmc/watchdog/%I
ExecStart=/usr/bin/phosphor-watchdog --continue --service=${{SERVICE}} --path=${{DEVPATH}} --target=${{TARGET}} --default_interval=${{TIMEOUT_IN_MSEC}}
@@ -0,0 +1,4 @@
[Unit]
Conflicts=obmc-host-stop@0.target
Conflicts=obmc-chassis-poweroff@0.target
Conflicts=obmc-host-quiesce@0.target
@@ -0,0 +1,52 @@
SUMMARY = "Phosphor Watchdog application"
DESCRIPTION = "Application that implements software watchdog"
HOMEPAGE = "http://github.com/openbmc/phosphor-watchdog"
PR = "r1"
PV = "1.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
inherit meson pkgconfig
inherit obmc-phosphor-dbus-service
DEPENDS += "cli11"
DEPENDS += "sdbusplus"
DEPENDS += "sdeventplus"
DEPENDS += "phosphor-dbus-interfaces"
DEPENDS += "phosphor-logging"
DEPENDS += "systemd"
SRC_URI = "git://github.com/openbmc/phosphor-watchdog;branch=master;protocol=https"
SRCREV = "6072942ee9b13e441f2dc34ce7e93465248e30be"
S = "${WORKDIR}/git"
EXTRA_OEMESON = " \
-Dtests=disabled \
"
# Copies config file having arguments for host watchdog
SYSTEMD_ENVIRONMENT_FILE:${PN} +="obmc/watchdog/poweron"
# Install the override to set up a Conflicts relation
SYSTEMD_OVERRIDE:${PN} += "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
# For now, watching PowerOn is the only usecase
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-startmin@{1}.target.wants/${WATCHDOG_TGTFMT}"
ENABLE_WATCHDOG_FMT = "../${ENABLE_WATCHDOG_TMPL}:obmc-host-startmin@{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')}"