summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-phosphor/leds
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 06:25:51 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-06 07:44:12 -0400
commitff075f6ee795a590b244d70a90cc312ba1f2d83d (patch)
treea617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/recipes-phosphor/leds
parent3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff)
downloadblackbird-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.gz
blackbird-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.zip
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/leds')
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb16
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb24
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native.bb21
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.bb56
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc5
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf3
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service12
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service12
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service12
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service13
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs.bb26
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules1
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service7
-rw-r--r--meta-phosphor/recipes-phosphor/leds/phosphor-logging-error-logs-native.bbappend1
14 files changed, 209 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
new file mode 100644
index 000000000..4b546d05f
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Phosphor LED Group Management with example data"
+PR = "r1"
+
+inherit native
+require phosphor-led-manager.inc
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+S = "${WORKDIR}/git"
+
+# Copies example led layout yaml file
+do_install() {
+ SRC=${S}
+ DEST=${D}${datadir}/phosphor-led-manager
+ install -D ${SRC}/led.yaml ${DEST}/led.yaml
+}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
new file mode 100644
index 000000000..920f63745
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Phosphor LED Group Management with MRW generated data"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-utils
+inherit obmc-phosphor-license
+inherit mrw-xml
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install_append() {
+ USE_MRW="${@df_enabled(d, 'obmc-mrw', 'yes')}"
+ DEST=${D}${datadir}/phosphor-led-manager
+
+ if [ "${USE_MRW}" = "yes" ]; then
+ install -d ${DEST}/
+ ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+ ${STAGING_BINDIR_NATIVE}/gen_led_groups.pl \
+ -i ${mrw_datadir}/${MRW_XML} \
+ -o ${DEST}/led.yaml
+ fi
+}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native.bb
new file mode 100644
index 000000000..c8ec04127
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager-error-native.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Copy error yaml files to known path for elog parsing"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit native
+inherit phosphor-dbus-yaml
+
+require phosphor-led-manager.inc
+
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ SRC=${S}/xyz/openbmc_project/Led/
+ DEST=${D}${yaml_dir}/xyz/openbmc_project/Led/
+ install -d ${DEST}/Fru
+ install ${SRC}/*.errors.yaml ${DEST}
+ install ${SRC}/*.metadata.yaml ${DEST}
+ install ${SRC}/Fru/*.errors.yaml ${DEST}/Fru
+ install ${SRC}/Fru/*.metadata.yaml ${DEST}/Fru
+}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.bb
new file mode 100644
index 000000000..d501d332a
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Phosphor LED Group Management Daemon"
+DESCRIPTION = "Daemon to cater to triggering actions on LED groups"
+PR = "r1"
+
+require ${PN}.inc
+
+inherit autotools pkgconfig pythonnative
+inherit obmc-phosphor-dbus-service obmc-phosphor-systemd
+
+LED_MGR_PACKAGES = " \
+ ${PN}-ledmanager \
+ ${PN}-faultmonitor \
+"
+
+PACKAGE_BEFORE_PN += "${LED_MGR_PACKAGES}"
+ALLOW_EMPTY_${PN} = "1"
+
+DBUS_PACKAGES = "${PN}-ledmanager"
+
+SYSTEMD_PACKAGES = "${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}-ledmanager += "libsystemd"
+RDEPENDS_${PN}-ledmanager += "phosphor-logging"
+
+RDEPENDS_${PN}-faultmonitor += "libsystemd"
+RDEPENDS_${PN}-faultmonitor += "phosphor-logging"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN}-ledmanager += "${sbindir}/phosphor-ledmanager"
+FILES_${PN}-faultmonitor += "${sbindir}/phosphor-fru-fault-monitor"
+
+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}-ledmanager += "${@compose_list(d, 'FMT', 'STATES')}"
+
+# Install the override to set up a Conflicts relation
+SYSTEMD_OVERRIDE_${PN}-ledmanager += "bmc_booted.conf:obmc-led-group-start@bmc_booted.service.d/bmc_booted.conf"
+
+EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc
new file mode 100644
index 000000000..0562742e5
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-led-manager"
+SRCREV = "08d613e7d549d647105bb7ff5a6d3716708d2332"
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf
new file mode 100644
index 000000000..a300f6ace
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/bmc_booted.conf
@@ -0,0 +1,3 @@
+[Unit]
+Wants={SYSTEMD_DEFAULT_TARGET}
+After={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
new file mode 100644
index 000000000..4810a7e86
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-fru-fault-monitor.service
@@ -0,0 +1,12 @@
+[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=/usr/bin/env phosphor-fru-fault-monitor
+SyslogIdentifier=phosphor-fru-fault-monitor
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
new file mode 100644
index 000000000..e0e1fc935
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Assert %i LED
+Wants=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+After=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+Conflicts=obmc-led-group-stop@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/led/groups/%i` /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true"
+SyslogIdentifier=obmc-led-group-start
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
new file mode 100644
index 000000000..7b3966943
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Assert %i LED
+Wants=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+After=mapper-wait@-xyz-openbmc_project-led-groups-%i.service
+Conflicts=obmc-led-group-start@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/led/groups/%i` /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false"
+SyslogIdentifier=obmc-led-group-stop
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
new file mode 100644
index 000000000..2f9a25e91
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager/xyz.openbmc_project.LED.GroupManager.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor LED Group Management Daemon
+Before=mapper-wait@-xyz-openbmc_project-led-groups.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-ledmanager
+SyslogIdentifier=phosphor-ledmanager
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs.bb
new file mode 100644
index 000000000..76da1b56a
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Phosphor Physical LED Controller daemon"
+DESCRIPTION = "Daemon to trigger actions on a physical LED"
+HOMEPAGE = "http://github.com/openbmc/phosphor-led-sysfs"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-dbus-interfaces"
+RDEPENDS_${PN} += "libsystemd"
+
+DBUS_SERVICE_${PN} += "xyz.openbmc_project.led.controller@.service"
+
+SRC_URI += "git://github.com/openbmc/phosphor-led-sysfs"
+SRC_URI += "file://70-leds.rules"
+SRCREV = "8609c65aaa48eeff85cd9dd375253d7755581993"
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ install -d ${D}/${base_libdir}/udev/rules.d/
+ install ${WORKDIR}/70-leds.rules ${D}/${base_libdir}/udev/rules.d/
+}
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
new file mode 100644
index 000000000..372d81293
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys-class-leds-$name"
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
new file mode 100644
index 000000000..c673cda66
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Phosphor sysfs LED controller
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env phosphor-ledcontroller -p %f
+SyslogIdentifier=phosphor-ledcontroller
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-logging-error-logs-native.bbappend b/meta-phosphor/recipes-phosphor/leds/phosphor-logging-error-logs-native.bbappend
new file mode 100644
index 000000000..3f2c5c811
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/leds/phosphor-logging-error-logs-native.bbappend
@@ -0,0 +1 @@
+DEPENDS += "phosphor-led-manager-error-native"
OpenPOWER on IntegriCloud