summaryrefslogtreecommitdiff
path: root/meta-fii
diff options
context:
space:
mode:
authorLancelot Kao <lancelot.kao@fii-usa.com>2021-02-21 09:54:42 +0300
committerMohaimen Alsamarai <mohaimen.alsamarai@fii-na.com>2021-07-27 23:00:08 +0300
commit64bede8a9ff7eb6f03f2d191a9fec06554356bf4 (patch)
treebcc28f40456995042e48a78ca76a41daf69cb323 /meta-fii
parenta17ba54d69c51eaca452606430eb07788d32829d (diff)
downloadopenbmc-64bede8a9ff7eb6f03f2d191a9fec06554356bf4.tar.xz
meta-fii/meta-kudo: Add kudo watchdog package
1. Add kudo watchdog service 2. Add kudo specific watchdog action services 3. Fix watchdog action.services to not autostart Signed-off-by: Lancelot Kao <lancelot.kao@fii-usa.com> Change-Id: I49e672c93001a5ba7b8960b914222ff7abc37c9f Signed-off-by: Mohaimen Alsamarai <mohaimen.alsamarai@fii-na.com>
Diffstat (limited to 'meta-fii')
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service8
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service18
-rw-r--r--meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend9
5 files changed, 51 insertions, 0 deletions
diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
new file mode 100644
index 000000000..73aabb6ed
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Watchdog power state power hotswap
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env kudo.sh rst hotswap
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
new file mode 100644
index 000000000..9586368b5
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Watchdog power state power cycle shutdown
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env kudo.sh rst shutdown
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
new file mode 100644
index 000000000..fb6614e49
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Watchdog power state reset system
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart=/usr/bin/env kudo.sh rst system
+SyslogIdentifier=phosphor-watchdog
diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
new file mode 100644
index 000000000..675293456
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Phosphor Watchdog
+
+[Service]
+ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
+ --path=/xyz/openbmc_project/watchdog/host0 \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=phosphor-watchdog-host-poweroff.service \
+ --action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
+
+# This should use state manager instead of the service files currently defined
+
+SyslogIdentifier=phosphor-watchdog
+BusName=xyz.openbmc_project.Watchdog
+Type=dbus
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
new file mode 100644
index 000000000..e795905ab
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS_prepend_kudo := "${THISDIR}/${PN}:"
+
+# Remove the override to keep service running after DC cycle
+SYSTEMD_OVERRIDE_${PN}_remove_kudo = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
+SYSTEMD_SERVICE_${PN}_kudo = " phosphor-watchdog.service \
+ phosphor-watchdog-host-poweroff.service \
+ phosphor-watchdog-host-cycle.service\
+ phosphor-watchdog-host-reset.service\
+ "