summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/leds
diff options
context:
space:
mode:
authorNodeMan97 <corey.hardesty@icloud.com>2022-07-13 23:15:54 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-08-03 00:06:07 +0300
commite41c3fd5ac5b5e7f78580535e847d1e76221ef42 (patch)
tree14effe2309ffeb9a3aaf2578a18973419269db8f /meta-phosphor/recipes-phosphor/leds
parente32ec172cef5e11ab4d92c7972d6149e77ecf3a3 (diff)
downloadopenbmc-e41c3fd5ac5b5e7f78580535e847d1e76221ef42.tar.xz
Install blackout target to led-manager
Installs the led-service to the newly added 'obmc-chassis-blackout@ .target'. When a system suffers from a power blackout the power-leds may still be asserted to signify that they are on. This change ensures that obmc-led-group-stop@power_on.service is ran when a blackout is detected so that all led's are de-asserted. Tested: - Confirmed that the service was installed to the target root@p10bmc:/lib/systemd/system/obmc-chassis-blackout@0.target.wants# ls obmc-led-group-stop@power_on.service phosphor-reset-sensor-states@0.service - Verified that obmc-led-group-start@power_on.service was stopped when obmc-chassis-blackout@0.target is hit. root@p10bmc: systemctl start obmc-chassis-blackout@0.target Jul 22 20:48:14 p10bmc systemd[1]: obmc-led-group-start@power_on.service:Deactivated successfully. Jul 22 20:48:14 p10bmc systemd[1]: Stopped Assert power_on LED root@p10bmc:~# systemctl status obmc-led-group-stop@power_on.service * obmc-led-group-stop@power_on.service - Assert power_on LED Loaded: loaded (/lib/systemd/system/obmc-led-group-stop@.service; static) Active: active (exited) since Fri 2022-07-22 20:48:14 UTC; 37s ago Signed-off-by: Corey Hardesty <corey.hardesty@icloud.com> Change-Id: Iec51e970b07ed331cff32c6e26c6f869167291dc
Diffstat (limited to 'meta-phosphor/recipes-phosphor/leds')
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb
index c481aa5db1..b2cf9f7ab4 100644
--- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb
@@ -54,6 +54,12 @@ INSTFMT = "obmc-led-group-{1}@power_on.service"
FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}"
SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'FMT', 'CHASSIS_TARGETS', 'STATES')}"
+CHASSIS_BLACKOUT_TGT = "obmc-chassis-blackout@{0}.target"
+LED_STOP_SVC = "obmc-led-group-stop@.service"
+LED_POWER_STOP_SVC = "obmc-led-group-stop@power_on.service"
+CHASSIS_LED_BLACKOUT_FMT = "../${LED_STOP_SVC}:${CHASSIS_BLACKOUT_TGT}.wants/${LED_POWER_STOP_SVC}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'CHASSIS_LED_BLACKOUT_FMT', 'OBMC_CHASSIS_INSTANCES' )}"
+
# Install the override to set up a Conflicts relation
SYSTEMD_OVERRIDE:${PN} += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf"