summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend
diff options
context:
space:
mode:
authorDelphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>2023-07-26 08:30:52 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-08-07 08:56:57 +0300
commitad82d62bdfb9654c353df82b518d2bff1df42eab (patch)
treec4ab0c61d8fc02da4df8fd2fa87c21b970a6f299 /meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend
parentc87d6d998b25ad4e0266130e613d8dc71ebf0945 (diff)
downloadopenbmc-ad82d62bdfb9654c353df82b518d2bff1df42eab.tar.xz
meta-facebook: yosemite4: Support host and chassis power control
Description: - Support host and chassis power control by setting dbus property from phosphor-state-manager Design: - Add host/chassis power control services and scripts - chassis power control: - do 12V power on/off/cycle by setting virtual i/o exp output port. Limitation: - Implementation of host power control and sled cycle are not support for now. - Host power control will be implemented after both BMC/BIC support PDLM commands. - Sled cycle will be implemented after power control between CPLD and HSC was ready. Test Case: - host power on: - command: - busctl set-property xyz.openbmc_project.State.Host8 /xyz/openbmc_project/state/host8 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_proct.State.Host.Transition.On" - show "Host power on is not support for now" in journal - host power off: - command: - busctl set-property xyz.openbmc_project.State.Host8 /xyz/openbmc_project/state/host8 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Off" - show "Host power off is not support for now" in journal - host power cycle: - command: - busctl set-property xyz.openbmc_project.State.Host8 /xyz/openbmc_project/state/host8 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Powercycle" - show "Host power cycle is not support for now" in journal - host power reset: - command: - busctl set-property xyz.openbmc_project.State.Host8 /xyz/openbmc_project/state/host8 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.ForceWarmReboot" - show "Host power reset is not support for now" in journal - chassis power on: - command: - busctl set-property xyz.openbmc_project.State.Chassis8 /xyz/openbmc_project/state/chassis8 xyz.openbmc_project.State.Chassis RequestedPowerTransition s "xyz.openbmc_project.State.Chassis.Transition.On" - show chassis-poweron started in journal - chassis power off: - command: - busctl set-property xyz.openbmc_project.State.Chassis8 /xyz/openbmc_project/state/chassis8 xyz.openbmc_project.State.Chassis RequestedPowerTransition s "xyz.openbmc_project.State.Chassis.Transition.Off" - show chassis-poweroff started in journal - chassis power cycle: - command: - busctl set-property xyz.openbmc_project.State.Chassis8 /xyz/openbmc_project/state/chassis8 xyz.openbmc_project.State.Chassis RequestedPowerTransition s "xyz.openbmc_project.State.Chassis.Transition.PowerCycle" - show chassis-powecycle started in journal - sled cycle: - command: - busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s "xyz.openbmc_project.State.Chassis.Transition.PowerCycle - show "SLED-cycle is not support for now" in journal Change-Id: I021e2c438974765bebeff6c7ed7e7d5b56c586a3 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Diffstat (limited to 'meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend')
-rw-r--r--meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend
new file mode 100644
index 0000000000..4e6a1ba1cb
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -0,0 +1,49 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+EXTRA_OEMESON:append = " \
+ -Dwarm-reboot=enabled \
+ "
+
+CHASSIS_DEFAULT_TARGETS:remove:yosemite4 = " \
+ obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-on@{}.service \
+ obmc-chassis-powerreset@{}.target.requires/phosphor-reset-chassis-running@{}.service \
+ obmc-chassis-poweroff@{}.target.requires/obmc-power-stop@{}.service \
+ obmc-chassis-poweron@{}.target.requires/obmc-power-start@{}.service \
+ "
+
+SRC_URI:append:yosemite4 = " \
+ file://chassis-poweroff@.service \
+ file://chassis-poweron@.service \
+ file://chassis-powercycle@.service \
+ file://host-poweroff@.service \
+ file://host-poweron@.service \
+ file://host-powercycle@.service \
+ file://host-powerreset@.service \
+ file://chassis-poweroff \
+ file://chassis-poweron \
+ file://chassis-powercycle \
+ file://host-poweroff \
+ file://host-poweron \
+ file://host-powercycle \
+ file://host-powerreset \
+ file://power-cmd \
+ "
+
+RDEPENDS:${PN}:append:yosemite4 = " bash"
+
+do_install:append:yosemite4() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/*.service ${D}${systemd_system_unitdir}/
+
+ install -d ${D}${libexecdir}/${PN}
+ install -m 0777 ${WORKDIR}/chassis-poweroff ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/chassis-poweron ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/chassis-powercycle ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/host-poweroff ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/host-poweron ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/host-powercycle ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/host-powerreset ${D}${libexecdir}/${PN}/
+ install -m 0777 ${WORKDIR}/power-cmd ${D}${libexecdir}/${PN}/
+}
+
+FILES:${PN} += " ${systemd_system_unitdir}/*.service"