summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"