diff options
author | Andrei Kartashev <a.kartashev@yadro.com> | 2021-12-15 15:34:44 +0300 |
---|---|---|
committer | Andrei Kartashev <a.kartashev@yadro.com> | 2022-06-20 08:45:57 +0300 |
commit | 4d0732320b117573ebd81b2e48b6b01f90bb8d0b (patch) | |
tree | 414af44613ab07dbdab80c13bf090bc5c585669b /meta-yadro | |
parent | 165718735646ebb1b7a3936aa88682f961302cf6 (diff) | |
download | openbmc-4d0732320b117573ebd81b2e48b6b01f90bb8d0b.tar.xz |
meta-yadro: vegman: fix phosphor-watchdog configuration
This brings a set of the unit-files to make `phosphor-watchdog`
working properly.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
Change-Id: I9763bf7e87753bfd2b9c7c05295dddd18e6f6c48
Diffstat (limited to 'meta-yadro')
5 files changed, 85 insertions, 0 deletions
diff --git a/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service new file mode 100644 index 0000000000..6a8eb033c4 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service @@ -0,0 +1,21 @@ +[Unit] +Description=Power Cycle Host Server +After=xyz.openbmc_project.Chassis.Power.service + +[Service] +ExecStart=/usr/bin/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.PowerCycle + +ExecStart=/usr/bin/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 + +Type=oneshot +SyslogIdentifier=phosphor-watchdog diff --git a/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service new file mode 100644 index 0000000000..aed7b93524 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service @@ -0,0 +1,14 @@ +[Unit] +Description=Shutdown Host Server +After=xyz.openbmc_project.Chassis.Power.service + +[Service] +ExecStart=/usr/bin/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 + +Type=oneshot +SyslogIdentifier=phosphor-watchdog diff --git a/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service new file mode 100644 index 0000000000..74eddb6a82 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service @@ -0,0 +1,21 @@ +[Unit] +Description=Reset Host Server +After=xyz.openbmc_project.Chassis.Power.service + +[Service] +ExecStart=/usr/bin/busctl set-property \ + xyz.openbmc_project.State.Host \ + /xyz/openbmc_project/state/host0 \ + xyz.openbmc_project.State.Host \ + RequestedHostTransition s \ + xyz.openbmc_project.State.Host.Transition.ForceWarmReboot + +ExecStart=/usr/bin/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 + +Type=oneshot +SyslogIdentifier=phosphor-watchdog diff --git a/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service new file mode 100644 index 0000000000..a23e58e570 --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog.service @@ -0,0 +1,17 @@ +[Unit] +Description=Phosphow 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 \ + +SyslogIdentifier=phosphor-watchdog +BusName=xyz.openbmc_project.Watchdog +Type=dbus + +[Install] +WantedBy=basic.target diff --git a/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend new file mode 100644 index 0000000000..348decc20c --- /dev/null +++ b/meta-yadro/meta-vegman/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" + +# Remove the override to keep service running after DC cycle +SYSTEMD_OVERRIDE:${PN}:remove = " \ + poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf \ +" +SYSTEMD_SERVICE:${PN} = " \ + phosphor-watchdog.service \ + phosphor-watchdog-host-poweroff.service \ + phosphor-watchdog-host-reset.service \ + phosphor-watchdog-host-cycle.service \ +" |