summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/leds
diff options
context:
space:
mode:
authorDhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>2017-04-27 05:29:56 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-19 17:41:23 +0000
commit6a1b0fcbb1f71687a528e1423521b4dc0ecc8684 (patch)
tree78811be1c5848332f5adfcf5bdb1844a72963353 /meta-phosphor/common/recipes-phosphor/leds
parentd75d9c516913bee640e3b4c245e8bd40e0965002 (diff)
downloadtalos-openbmc-6a1b0fcbb1f71687a528e1423521b4dc0ecc8684.tar.gz
talos-openbmc-6a1b0fcbb1f71687a528e1423521b4dc0ecc8684.zip
leds: package the FRU fault monitor application.
Resolves openbmc/openbmc#941 Change-Id: I3e5672af468185f6bae50c438820a10d57d60d55 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/leds')
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb41
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service11
2 files changed, 44 insertions, 8 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
index 7f2477221..5f1f36d2a 100644
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
@@ -2,31 +2,56 @@ SUMMARY = "Phosphor LED Group Management Daemon"
DESCRIPTION = "Daemon to cater to triggering actions on LED groups"
PR = "r1"
-inherit autotools pkgconfig pythonnative
-inherit obmc-phosphor-dbus-service
require ${PN}.inc
+inherit autotools pkgconfig pythonnative
+inherit obmc-phosphor-dbus-service obmc-phosphor-systemd
+
+LED_MGR_PACKAGES = " \
+ ${PN}-ledmanager \
+ ${PN}-faultmonitor \
+"
+
+PACKAGES += "${LED_MGR_PACKAGES}"
+PACKAGES_remove = "${PN}"
+
+DBUS_PACKAGES = "${PN}-ledmanager"
+
+SYSTEMD_PACKAGES = "${LED_MGR_PACKAGES}"
+
+RDEPENDS_${PN}-dev = "${LED_MGR_PACKAGES}"
+RDEPENDS_${PN}-staticdev = "${LED_MGR_PACKAGES}"
+
DEPENDS += "python-pyyaml-native"
DEPENDS += "autoconf-archive-native"
DEPENDS += "sdbusplus sdbusplus-native"
DEPENDS += "phosphor-logging"
DEPENDS += "virtual/${PN}-config-native"
-RDEPENDS_${PN} += "libsystemd"
-RDEPENDS_${PN} += "phosphor-logging"
+RDEPENDS_${PN}-ledmanager += "libsystemd"
+RDEPENDS_${PN}-ledmanager += "phosphor-logging"
+
+RDEPENDS_${PN}-faultmonitor += "libsystemd"
+RDEPENDS_${PN}-faultmonitor += "phosphor-logging"
S = "${WORKDIR}/git"
-DBUS_SERVICE_${PN} += "xyz.openbmc_project.LED.GroupManager.service"
-SYSTEMD_SERVICE_${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service"
+FILES_${PN}-ledmanager += "${sbindir}/phosphor-ledmanager"
+FILES_${PN}-faultmonitor += "${sbindir}/phosphor-fru-fault-monitor"
-SYSTEMD_LINK_${PN} += "../obmc-led-group-start@.service:${SYSTEMD_DEFAULT_TARGET}.wants/obmc-led-group-start@bmc_booted.service"
+DBUS_SERVICE_${PN}-ledmanager += "xyz.openbmc_project.LED.GroupManager.service"
+
+SYSTEMD_SERVICE_${PN}-ledmanager += "obmc-led-group-start@.service obmc-led-group-stop@.service"
+SYSTEMD_SERVICE_${PN}-faultmonitor += "obmc-fru-fault-monitor.service"
+
+SYSTEMD_LINK_${PN}-ledmanager += "../obmc-led-group-start@.service:${SYSTEMD_DEFAULT_TARGET}.wants/obmc-led-group-start@bmc_booted.service"
STATES = "start stop"
TMPLFMT = "obmc-led-group-{0}@.service"
TGTFMT = "obmc-power-{0}@0.target"
INSTFMT = "obmc-led-group-{0}@power_on.service"
FMT = "../${TMPLFMT}:${TGTFMT}.wants/${INSTFMT}"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'STATES')}"
+SYSTEMD_LINK_${PN}-ledmanager += "${@compose_list(d, 'FMT', 'STATES')}"
+
EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
new file mode 100644
index 000000000..ab836223e
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=FRU Fault monitor service
+Wants=mapper-wait@-xyz-openbmc_project-led-groups.service
+After=mapper-wait@-xyz-openbmc_project-led-groups.service
+
+[Service]
+Restart=always
+ExecStart={sbindir}/phosphor-fru-fault-monitor
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud