meta-ampere: support Altra Boot Progress handling
Handle Altra Boot Progress reported from SCP regiter map by the use of
smpro-misc driver.
Tested: check boot progress is updated in Redfish for:
1. Reboot Host.
2. IPMI chassis power reset
3. IPMI chassis power cycle
4. IPMI chassis power off, then on
5. WebUI Orderly – OS shuts down, then server reboots
6. WebUI Immediate – Server reboots without OS shutting down
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I9483328ccf5731904d0e6e71074561f7dd743bed
diff --git a/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress.bb b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress.bb
new file mode 100644
index 0000000..823bea7
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Altra Boot Progress Handling Service"
+DESCRIPTION = "OpenBMC Altra Boot Progress Handling Daemon"
+
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+inherit obmc-phosphor-systemd
+
+DEPENDS += "systemd"
+RDEPENDS:${PN} += "libsystemd"
+RDEPENDS:${PN} += "bash"
+
+SRC_URI = " \
+ file://ampere_boot_progress.sh \
+ "
+
+SYSTEMD_PACKAGES = "${PN}"
+
+HOST_ON_RESET_HOSTTMPL = "ampere-boot-progress.service"
+HOST_ON_RESET_HOSTINSTMPL = "ampere-boot-progress.service"
+HOST_ON_RESET_HOSTTGTFMT = "obmc-host-already-on@{0}.target"
+HOST_ON_RESET_HOSTFMT = "../${HOST_ON_RESET_HOSTTMPL}:${HOST_ON_RESET_HOSTTGTFMT}.requires/${HOST_ON_RESET_HOSTINSTMPL}"
+SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_ON_RESET_HOSTFMT', 'OBMC_HOST_INSTANCES')}"
+
+SYSTEMD_SERVICE:${PN} += "${HOST_ON_RESET_HOSTTMPL}"
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/ampere_boot_progress.sh ${D}${sbindir}/
+}
+