Skip to content

Commit 372e564

Browse files
rajaganeshrojayanth
authored andcommitted
meta-amd: Add IPMI watchdog support
Added IPMI watchdog service to AMD platforms. Change-Id: I7da12dd45eaaa5b9c92c9876cdca7cabc1f79d33 Signed-off-by: Rajaganesh Rathinasabapathi <[email protected]>
1 parent 3594786 commit 372e564

File tree

6 files changed

+53
-0
lines changed

6 files changed

+53
-0
lines changed

meta-amd/meta-common/recipes-amd/packagegroups/packagegroup-amd-apps.bb

+1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ RDEPENDS_PN_SYSTEM_EXTRAS = ""
5353
RDEPENDS_PN_SYSTEM_EXTRAS:amd-withhost = " \
5454
amd-fpga \
5555
phosphor-hostlogger \
56+
phosphor-watchdog \
5657
"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=Power Cycle Host Server
3+
Requires=xyz.openbmc_project.Chassis.Control.Power.service
4+
After=xyz.openbmc_project.Chassis.Control.Power.service
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
9+
ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
10+
ExecStart=sleep 6
11+
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.On
12+
SyslogIdentifier=phosphor-watchdog
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Shutdown Host Server
3+
Requires=xyz.openbmc_project.Chassis.Control.Power.service
4+
After=xyz.openbmc_project.Chassis.Control.Power.service
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
9+
SyslogIdentifier=phosphor-watchdog
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Reset Host Server
3+
Requires=xyz.openbmc_project.Chassis.Control.Power.service
4+
After=xyz.openbmc_project.Chassis.Control.Power.service
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Reset
9+
ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
10+
SyslogIdentifier=phosphor-watchdog
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Unit]
2+
Description=Phosphor Watchdog
3+
4+
[Service]
5+
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
6+
--path=/xyz/openbmc_project/watchdog/host0 \
7+
--action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
8+
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=host-phosphor-watchdog-host-poweroff.service \
9+
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
10+
11+
SyslogIdentifier=phosphor-watchdog
12+
BusName =xyz.openbmc_project.Watchdog
13+
Type=dbus
14+
15+
[Install]
16+
WantedBy=basic.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
2+
3+
# Remove the override to keep service running after DC cycle
4+
SYSTEMD_OVERRIDE_${PN}:remove = "poweron.conf:[email protected]/poweron.conf"
5+
SYSTEMD_SERVICE_${PN} = "phosphor-watchdog.service phosphor-watchdog-host-poweroff.service phosphor-watchdog-host-reset.service phosphor-watchdog-host-cycle.service"

0 commit comments

Comments
 (0)