summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2024-04-19 05:31:54 +0300
committerPatrick Williams <patrick@stwcx.xyz>2024-04-20 00:10:02 +0300
commiteaff5a8909e88daab9c83089da8ef61ffa578c06 (patch)
tree712ac17ff02bcea932dbbbe2f77142729781e01a
parent9101a902bfc1290c43df6e57ccfda4025c8981c0 (diff)
downloadopenbmc-eaff5a8909e88daab9c83089da8ef61ffa578c06.tar.xz
meta-phosphor: phosphor-state-manager: add host-gpio PACKAGECONFIG
Add a PACKAGECONFIG that enables the host-gpio feature in PSM. Set the appropriate dependencies, meson options, and install the service file links as appropriate. Tested: Built Yosemite4 with enabled and verified services are attempted to start. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia737a5645dcf472efdc75a9af7260eff60ef90ed
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc7
-rw-r--r--meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb5
2 files changed, 12 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
index 8e214c32fa..f6fa3c4e4a 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
@@ -146,6 +146,13 @@ pkg_postinst:${PN}-host:append() {
LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Host@${i}.service"
TARGET="../xyz.openbmc_project.State.Host@.service"
ln -s $TARGET $LINK
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'host-gpio', 'true', 'false', d)}
+ then
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@${i}.service"
+ TARGET="../phosphor-host-condition-gpio@.service"
+ ln -s $TARGET $LINK
+ fi
done
}
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
index 03b9b4b1e6..29dd022bc5 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb
@@ -51,6 +51,9 @@ PACKAGECONFIG[only-run-apr-on-power-loss] = "-Donly-run-apr-on-power-loss=true,-
# Only allow boot operations when BMC is in Ready state
PACKAGECONFIG[only-allow-boot-when-bmc-ready] = "-Donly-allow-boot-when-bmc-ready=true,-Donly-allow-boot-when-bmc-ready=false"
+# Enable host state GPIO
+PACKAGECONFIG[host-gpio] = "-Dhost-gpios=enabled,-Dhost-gpios=disabled,gpioplus"
+
# The host-check function will check if the host is running
# after a BMC reset.
# The reset-sensor-states function will reset the host
@@ -85,6 +88,7 @@ RDEPENDS:${PN}-host += "bash"
EXTRA_OEMESON:append = " -Dtests=disabled"
FILES:${PN}-host = "${bindir}/phosphor-host-state-manager"
+FILES:${PN}-host += "${bindir}/phosphor-host-condition-gpio"
FILES:${PN}-host += "${libexecdir}/phosphor-state-manager/host-reboot"
DBUS_SERVICE:${PN}-host += "xyz.openbmc_project.State.Host@.service"
DBUS_SERVICE:${PN}-host += "phosphor-reboot-host@.service"
@@ -92,6 +96,7 @@ SYSTEMD_SERVICE:${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-clear-one-time@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-running@.service"
SYSTEMD_SERVICE:${PN}-host += "phosphor-set-host-transition-to-off@.service"
+SYSTEMD_SERVICE:${PN}-host += "${@bb.utils.contains('PACKAGECONFIG', 'host-gpio', 'phosphor-host-condition-gpio@.service', '', d)}"
FILES:${PN}-chassis = "${bindir}/phosphor-chassis-state-manager"
DBUS_SERVICE:${PN}-chassis += "xyz.openbmc_project.State.Chassis@.service"