summaryrefslogtreecommitdiffstats
path: root/meta-phosphor
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-02-11 22:10:23 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-03-03 16:39:00 +0530
commit7f07e7d28463403b5d26cd403d87f0292b0b2cf2 (patch)
treec7221ce85449f526095157618b7e795070386466 /meta-phosphor
parentdb86d27a593f932cd2d4d77307801b3a8e00874f (diff)
downloadtalos-openbmc-7f07e7d28463403b5d26cd403d87f0292b0b2cf2.tar.gz
talos-openbmc-7f07e7d28463403b5d26cd403d87f0292b0b2cf2.zip
Update LED Manager recipe to support Palmetto machine
This has the changes that enables LED group manager on Palmetto Change-Id: Iaf4d4cc4c798c70e557009e9928225facb1d7d86 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb2
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb1
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-native.bb19
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service10
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service10
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc8
7 files changed, 33 insertions, 20 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
index 8b3703d98..139b775e7 100644
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
@@ -5,6 +5,8 @@ inherit native
inherit obmc-phosphor-utils
require phosphor-led-manager.inc
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
S = "${WORKDIR}/git"
# Copies example led layout yaml file
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
index b88dedcd9..fb3259b4a 100644
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
@@ -5,6 +5,7 @@ inherit native
inherit obmc-phosphor-utils
inherit obmc-phosphor-license
+PROVIDES += "virtual/phosphor-led-manager-config-native"
DEPENDS += "mrw-native mrw-perl-tools-native"
# Generate a YAML files based on MRW input
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-native.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-native.bb
deleted file mode 100644
index 73812eab5..000000000
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-native.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Phosphor LED Group Management meta data"
-PR = "r1"
-
-inherit obmc-phosphor-utils
-inherit obmc-phosphor-license
-inherit native
-
-# Default is the example set of data.
-PHOSPHOR_LED_MANAGER_CONFIG ??= "${BPN}-example-native"
-
-# Choose appropriate yaml file
-def get_depends(d):
- if d.getVar('USE_MRW', 'yes'):
- return "${BPN}-mrw-native"
- else:
- return "${PHOSPHOR_LED_MANAGER_CONFIG}"
-
-USE_MRW = "${@cf_enabled(d, 'obmc-mrw', 'yes')}"
-DEPENDS += "${@get_depends(d)}"
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 54996f999..17871895b 100644
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
@@ -9,11 +9,12 @@ require ${PN}.inc
DEPENDS += "python-pyyaml-native"
DEPENDS += "autoconf-archive-native"
DEPENDS += "sdbusplus sdbusplus-native"
-DEPENDS += "${PN}-config-native"
+DEPENDS += "virtual/${PN}-config-native"
RDEPENDS_${PN} += "libsystemd"
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"
EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
new file mode 100644
index 000000000..7c0207c0d
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-start@.service
@@ -0,0 +1,10 @@
+[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
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart={sbindir}/mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
new file mode 100644
index 000000000..4ddf0f8e2
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager/obmc-led-group-stop@.service
@@ -0,0 +1,10 @@
+[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
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart={sbindir}/mapper call /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 28e04ef3a..0577085a6 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -80,5 +80,13 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory ?= \
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-properties ?= \
"${@cf_enabled(d, 'obmc-mrw', 'phosphor-ipmi-fru-properties-mrw-native', 'phosphor-ipmi-fru-properties-example-native')}"
+# The phosphor-led-manager application is data-driven and requires an input
+# yaml of LED group and members.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-led-manager build process in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native ?= \
+ "${@cf_enabled(d, 'obmc-mrw', 'phosphor-led-manager-config-mrw-native', 'phosphor-led-manager-config-example-native')}"
+
OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"
OpenPOWER on IntegriCloud