summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-01-23 16:04:35 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-01-31 04:54:09 +0000
commit96d836578115b2b2405470c632d603761084a2ea (patch)
tree4bdb3ca2e99067024a7215c53c9cff45c7ecf169
parent06f6d01f1f0f04866fe75d529168dad3cb4bb4b4 (diff)
downloadtalos-openbmc-96d836578115b2b2405470c632d603761084a2ea.tar.gz
talos-openbmc-96d836578115b2b2405470c632d603761084a2ea.zip
Add recipe files to Auto generate led manager configuration files
Change-Id: Idb60e5fa12ef6114eccabada85920aae2f0a3a1b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb15
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb22
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config.bb18
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb10
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.inc5
5 files changed, 64 insertions, 6 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
new file mode 100644
index 000000000..2300e0413
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-example-native.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Phosphor LED Group Management with example data"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-utils
+require phosphor-led-manager.inc
+
+S = "${WORKDIR}/git"
+
+# Copies example led layout yaml file
+do_install() {
+ SRC=${S}
+ DEST=${STAGING_DATADIR_NATIVE}/phosphor-led-manager
+ install -D ${SRC}/led.yaml ${DEST}/led.yaml
+}
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
new file mode 100644
index 000000000..3a28a2436
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor LED Group Management with MRW generated data"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-utils
+inherit obmc-phosphor-license
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install_append() {
+ USE_MRW="${@cf_enabled('obmc-mrw', 'yes', d)}"
+ DEST=${STAGING_DATADIR_NATIVE}/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 ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+ -o ${DEST}/led.yaml
+ fi
+}
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config.bb
new file mode 100644
index 000000000..3a0449841
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Phosphor LED Group Management meta data"
+PR = "r1"
+
+inherit obmc-phosphor-utils
+inherit obmc-phosphor-license
+
+# Default is the example set of data.
+PHOSPHOR_LED_MANAGER_CONFIG ??= "${PN}-example-native"
+
+# Choose appropriate yaml file
+def get_depends(d):
+ if d.getVar('USE_MRW', 'yes'):
+ return "${PN}-mrw-native"
+ else:
+ return "${PHOSPHOR_LED_MANAGER_CONFIG}"
+
+USE_MRW = "${@cf_enabled('obmc-mrw', 'yes', d)}"
+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 25041bec4..a30f2f99b 100644
--- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.bb
@@ -1,20 +1,18 @@
SUMMARY = "Phosphor LED Group Management Daemon"
DESCRIPTION = "Daemon to cater to triggering actions on LED groups"
-HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager"
PR = "r1"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-inherit pythonnative
inherit autotools pkgconfig
+require ${PN}.inc
DEPENDS += "python-pyyaml-native"
DEPENDS += "autoconf-archive-native"
DEPENDS += "sdbusplus sdbusplus-native"
+DEPENDS += "${PN}-config"
RDEPENDS_${PN} += "libsystemd"
-SRC_URI += "git://github.com/openbmc/phosphor-led-manager"
-SRCREV = "a35237633ac89d6b9932dbdb68e1a50072f9e8b2"
S = "${WORKDIR}/git"
DBUS_SERVICE_${PN} += "xyz.openbmc_project.ledmanager.service"
+
+EXTRA_OECONF = "YAML_PATH=${STAGING_DATADIR_NATIVE}/${PN}"
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.inc b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager.inc
new file mode 100644
index 000000000..11aaaea53
--- /dev/null
+++ b/meta-phosphor/common/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 = "a35237633ac89d6b9932dbdb68e1a50072f9e8b2"
OpenPOWER on IntegriCloud