diff options
author | Tung Nguyen <tungnguyen@os.amperecomputing.com> | 2020-12-16 08:52:18 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2021-02-01 16:44:46 +0300 |
commit | 8f221bfb0979fa018f6c16b5af153c1549448e7d (patch) | |
tree | 9b3baba9fd63d76b769e7a1aacbe652625cda90b /meta-ampere/meta-common/recipes-phosphor/state | |
parent | dd68b8bdc0cedd29bffa97b7dc6d0bce3a0ffb1e (diff) | |
download | openbmc-8f221bfb0979fa018f6c16b5af153c1549448e7d.tar.xz |
meta-ampere: Support Ampere power control
Implement the Ampere power control requirements for Altra system.
Tested:
- Check the ipmi commands: ipmi power on/off/soft/reset/cycle
- Check the redfish commands: On, Off, ForceOn, ForceOff,
GracefulShutdown, GracefulRestart, ForceRestart, PowerCycle
Signed-off-by: Tung Nguyen <tungnguyen@os.amperecomputing.com>
Change-Id: Id0c64c1284a6338ce47ca720d0ef75e99d21aa3c
Diffstat (limited to 'meta-ampere/meta-common/recipes-phosphor/state')
-rw-r--r-- | meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/resetreason.conf | 2 | ||||
-rw-r--r-- | meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend | 24 |
2 files changed, 26 insertions, 0 deletions
diff --git a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/resetreason.conf b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/resetreason.conf new file mode 100644 index 000000000..828d98b8e --- /dev/null +++ b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/resetreason.conf @@ -0,0 +1,2 @@ +[Unit] +ConditionKernelCommandLine=resetreason=power diff --git a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend new file mode 100644 index 000000000..d54407ba3 --- /dev/null +++ b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend @@ -0,0 +1,24 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPS_CFG = "resetreason.conf" +DEPS_TGT = "phosphor-discover-system-state@.service" +SYSTEMD_OVERRIDE_${PN}-discover_append = "${DEPS_CFG}:${DEPS_TGT}.d/${DEPS_CFG}" + +# We don't want the obmc-host-shutdown (softoff) to require +# obmc-chassis-poweroff. obmc-chassis-poweroff will be activated once +# the Shutdown ACK pin is toggled (monitored by phosphor-gpio-monitor) +HOST_STOP_FMT = "" +HOST_REBOOT_FMT = "" + +pkg_postinst_${PN}-obmc-targets_append() { + rm "$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" + + rm "$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" + rm "$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" + + rm "$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" + rm "$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" + + rm "$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" + rm "$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" +} |