summaryrefslogtreecommitdiff
path: root/meta-ampere
diff options
context:
space:
mode:
authorThuBaNguyen <thu@os.amperecomputing.com>2021-06-19 12:15:13 +0300
committerthu <thu@os.amperecomputing.com>2021-08-04 13:42:59 +0300
commit99becbb128fb93a84197dafb8b7519dab5a65000 (patch)
tree72281a42e5dc0bcb72fd0ffd9443588cbc25b440 /meta-ampere
parent7b4528285147286f72769333cfde8c0d07ed11d1 (diff)
downloadopenbmc-99becbb128fb93a84197dafb8b7519dab5a65000.tar.xz
meta-ampere: host-check: overide phosphor-reset-host-check
When BMC boots, phosphor-host-check uses the software interfaces(IPMI inband Hearbeat command or PLDM interface) to verify the host state and creates the host on indicator file. Ampere Altra SoCs do not support those software interfaces. They use the GPIO interface. GPIO pin S0_FW_BOOT_OK go high when the host is on. This commit appends ampere-reset-host-check@.service to phosphor-state-manager This service will replaces the role of phosphor-reset-host-check@.service. Tested: 1. Boot up BMC with the host is off/on. 2. Verify the CurrentHostState. Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: Ie4f73538266fff7d8c5fd40b437ffebc82cb12c5
Diffstat (limited to 'meta-ampere')
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/ampere-reset-host-check@.service18
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend8
2 files changed, 26 insertions, 0 deletions
diff --git a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/ampere-reset-host-check@.service b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/ampere-reset-host-check@.service
new file mode 100644
index 000000000..83f6581be
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager/ampere-reset-host-check@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Check Host%i status on BMC reset
+Wants=phosphor-ipmi-host.service
+After=phosphor-ipmi-host.service
+Wants=obmc-host-reset-running@%i.target
+Before=obmc-host-reset-running@%i.target
+Wants=op-reset-chassis-on@%i.service
+After=op-reset-chassis-on@%i.service
+Conflicts=obmc-host-stop@%i.target
+ConditionPathExists=/run/openbmc/chassis@%i-on
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/usr/sbin/ampere_host_check.sh 1 0
+
+[Install]
+WantedBy=obmc-host-reset@%i.target \ No newline at end of file
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
index dcf8cac00..bdb89ce63 100644
--- a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend
+++ b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend
@@ -3,3 +3,11 @@ 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}"
+
+SRC_URI += " \
+ file://ampere-reset-host-check@.service \
+ "
+
+do_install_append() {
+ install -m 0644 ${WORKDIR}/ampere-reset-host-check@.service ${D}${systemd_unitdir}/system/phosphor-reset-host-check@.service
+} \ No newline at end of file