From eaff5a8909e88daab9c83089da8ef61ffa578c06 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 18 Apr 2024 21:31:54 -0500 Subject: 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 Change-Id: Ia737a5645dcf472efdc75a9af7260eff60ef90ed --- .../state/phosphor-state-manager-systemd-links.inc | 7 +++++++ meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb | 5 +++++ 2 files changed, 12 insertions(+) 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" -- cgit v1.2.3