summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb
diff options
context:
space:
mode:
authorThuBaNguyen <thu@os.amperecomputing.com>2021-07-05 09:32:26 +0300
committerThang Q. Nguyen <thang@os.amperecomputing.com>2021-08-04 10:59:04 +0300
commit2f952142e9ed8b436a0e702a0f46ac88842dd51e (patch)
treee4f58ad3c728bd6361d31c738e91b0cf257c079b /meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb
parent509991d6a5f34772788ca6d8401c19109e6280a6 (diff)
downloadopenbmc-2f952142e9ed8b436a0e702a0f46ac88842dd51e.tar.xz
meta-ampere: power control: refactor host power control
Refactor the Mt.Jade Host power control operations to support Altra CPU following the Altra SoC BMC Interface specification which still satisfying the OpenBMC power control framework. Tested: check the below cases and ensure Host state report correctly: 1. Run "reboot" from Host Linux. Check the Host is graceful shutdown, then SYS_RESET is asserted and the Host is booted. 2. Run "shutdown" from Host Linux. Check the Host is graceful shutdown then the chassis power is turned OFF. 3. Run "ipmitool chassis power soft". Check the Host is graceful shutdown 4. Execute Redfish GracefulShutdown. Check the Host is graceful shutdown then the chassis power is turned OFF. 5. Execute Redfish GracefulRestart. Check the Host is graceful shutdown then turned ON. 6. Check other IPMI chassis power and Redfish Reset actions work. Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: I3a9716f37d7e80bdc1a1d0422e561c8fc51ad040
Diffstat (limited to 'meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb')
-rw-r--r--meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb34
1 files changed, 5 insertions, 29 deletions
diff --git a/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb
index f8e295401..4a44d1b2f 100644
--- a/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb
+++ b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb
@@ -14,12 +14,9 @@ SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/shutdown_ack obmc/gpio/reboot_ack"
S = "${WORKDIR}"
SRC_URI = " \
- file://ampere-host-reset.service \
file://ampere_power_util.sh \
- file://ampere-chassis-poweron.service \
- file://ampere-host-reset-ack.service \
- file://ampere-host-force-reset.service \
- file://ampere-host-power-cycle.service \
+ file://ampere-host-force-reset@.service \
+ file://ampere-host-shutdown-ack@.service \
"
DEPENDS = "systemd virtual/obmc-gpio-monitor"
@@ -27,37 +24,16 @@ RDEPENDS_${PN} = "bash virtual/obmc-gpio-monitor"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = " \
- ampere-host-reset.service \
- ampere-chassis-poweron.service \
- ampere-host-reset-ack.service \
- ampere-host-force-reset.service \
- ampere-host-power-cycle.service \
+ ampere-host-force-reset@.service \
+ ampere-host-shutdown-ack@.service \
"
-# host power control
-# Force the power cycle target to run the ampere power cycle
-HOST_REBOOT_SVC = "ampere-host-power-cycle.service"
-HOST_REBOOT_SVC_TGTFMT = "obmc-host-reboot@{0}.target"
-HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_SVC_TGTFMT}.requires/${HOST_REBOOT_SVC}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES')}"
-
-# overwrite the host reset to graceful reset
-HOST_WARM_REBOOT_SOFT_SVC = "ampere-host-reset.service"
-HOST_WARM_REBOOT_TGTFMT = "obmc-host-warm-reboot@{0}.target"
-HOST_WARM_REBOOT_SOFT_SVC_FMT = "../${HOST_WARM_REBOOT_SOFT_SVC}:${HOST_WARM_REBOOT_TGTFMT}.requires/${HOST_WARM_REBOOT_SOFT_SVC}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_SOFT_SVC_FMT', 'OBMC_HOST_INSTANCES')}"
# overwrite force reboot
-HOST_WARM_REBOOT_FORCE_TGT = "ampere-host-force-reset.service"
+HOST_WARM_REBOOT_FORCE_TGT = "ampere-host-force-reset@.service"
HOST_WARM_REBOOT_FORCE_TGTFMT = "obmc-host-force-warm-reboot@{0}.target"
HOST_WARM_REBOOT_FORCE_TARGET_FMT = "../${HOST_WARM_REBOOT_FORCE_TGT}:${HOST_WARM_REBOOT_FORCE_TGTFMT}.requires/${HOST_WARM_REBOOT_FORCE_TGT}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}"
-# chassis power control
-CHASSIS_POWERON_SVC = "ampere-chassis-poweron.service"
-CHASSIS_POWERON_TGTFMT = "obmc-chassis-poweron@{0}.target"
-CHASSIS_POWERON_FMT = "../${CHASSIS_POWERON_SVC}:${CHASSIS_POWERON_TGTFMT}.requires/${CHASSIS_POWERON_SVC}"
-SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'CHASSIS_POWERON_FMT', 'OBMC_CHASSIS_INSTANCES')}"
-
TMPL = "phosphor-gpio-monitor@.service"
INSTFMT = "phosphor-gpio-monitor@{0}.service"
TGT = "multi-user.target"