summaryrefslogtreecommitdiff
path: root/meta-phosphor/common
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-12-14 22:31:55 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-01-30 23:37:44 +0300
commit0a8ea6354dd6b906f310316315fc49ace110a1ea (patch)
tree208ebd0de7c036c3b1d8b5cfe5037e27f4b60eaa /meta-phosphor/common
parent95eaf4978f6f92a848ba53accf02dcb52cee29b6 (diff)
downloadopenbmc-0a8ea6354dd6b906f310316315fc49ace110a1ea.tar.xz
Use variables for MRW XML filename and path
Create an mrw-xml bbclass that has variables for the MRW XML filename and path to it. Then, changes all users of the MRW XML to inherit that class and use those variables. The filename will default to ${MACHINE}.xml if it hasn't already been set to something else, such as in a .conf file. This is done so that the file can be something other than ${MACHINE}.xml. Change-Id: Ia7021e5a5d5e7946829e58688250aa64250cb00e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common')
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/inventory/obmc-inventory.bb4
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/mrw/mrw-native.bb5
-rw-r--r--meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb3
-rw-r--r--meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-read-settings-mrw.bb3
13 files changed, 28 insertions, 14 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb
index 1eadadf522..7ae05ce808 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-control-fan-config-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit phosphor-fan
+inherit mrw-xml
DEPENDS += " \
mrw-native \
@@ -17,7 +18,7 @@ S = "${WORKDIR}"
do_compile() {
${bindir}/perl-native/perl \
${bindir}/gen_fan_zone_yaml.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-o ${S}/fans.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
index 9d19847f3b..47dc2a4a1a 100644
--- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit phosphor-fan
+inherit mrw-xml
DEPENDS += " \
mrw-native \
@@ -20,6 +21,6 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_presence_yaml.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-o ${DEST}/config.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/inventory/obmc-inventory.bb b/meta-phosphor/common/recipes-phosphor/inventory/obmc-inventory.bb
index baab633c43..db3a5b404c 100644
--- a/meta-phosphor/common/recipes-phosphor/inventory/obmc-inventory.bb
+++ b/meta-phosphor/common/recipes-phosphor/inventory/obmc-inventory.bb
@@ -2,6 +2,8 @@ SUMMARY = "Phosphor Inventory Generation"
DESCRIPTION = "Generates inventory data from the machine readable workbook"
PR = "r1"
+inherit mrw-xml
+
S = "${WORKDIR}/git"
PROVIDES += "virtual/obmc-inventory-data"
@@ -20,7 +22,7 @@ FILES_${PN} += "${datadir}/inventory"
do_compile() {
${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \
- -x ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml -o inventory.json
+ -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json
}
do_install() {
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb
index 0c512fcb45..795c9b9c94 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-inventory-mrw-native.bb
@@ -3,6 +3,7 @@ PR = "r1"
inherit native
inherit phosphor-ipmi-fru
+inherit mrw-xml
require phosphor-ipmi-fru.inc
@@ -22,7 +23,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_ipmi_fru.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-m ${hostfw_datadir}/config.yaml \
-o ${DEST}/config.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
index 0d250e7a06..0a1c8bd1d3 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit phosphor-ipmi-fru
+inherit mrw-xml
SRC_URI += "file://config.yaml"
@@ -22,7 +23,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_fru_properties.pl \
- -m ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -m ${mrw_datadir}/${MRW_XML} \
-c config.yaml \
-o ${DEST}/extra-properties.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb
index 5b0ca6041b..3c5e36fce7 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb
@@ -3,6 +3,7 @@ PR = "r1"
inherit native
inherit phosphor-ipmi-host
+inherit mrw-xml
require phosphor-ipmi-host.inc
@@ -20,7 +21,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_ipmi_fru.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-m ${hostfw_datadir}/config.yaml \
-o ${DEST}/config.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb
index b8529378cb..f04d89f7d4 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-inventory-sel-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit phosphor-ipmi-host
+inherit mrw-xml
SRC_URI += "file://config.yaml"
@@ -22,7 +23,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_ipmi_sel.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-m config.yaml \
-o ${DEST}/invsensor.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb
index a9955fe137..67c6996db7 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-native.bb
@@ -5,6 +5,7 @@ inherit native
inherit obmc-phosphor-license
inherit phosphor-ipmi-host
inherit pythonnative
+inherit mrw-xml
DEPENDS += " \
mrw-native \
@@ -24,7 +25,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_ipmi_sensor.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-m ${sensor_yamldir}/config.yaml \
-o ${DEST}/sensor.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
index fb3259b4a8..ef1403096c 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
@@ -4,6 +4,7 @@ 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"
@@ -17,7 +18,7 @@ do_install_append() {
install -d ${DEST}/
${STAGING_BINDIR_NATIVE}/perl-native/perl \
${STAGING_BINDIR_NATIVE}/gen_led_groups.pl \
- -i ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-o ${DEST}/led.yaml
fi
}
diff --git a/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb
index 49816260a0..96852d4cab 100644
--- a/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging-callouts-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit phosphor-logging
+inherit mrw-xml
DEPENDS += " \
mrw-native \
@@ -20,6 +21,6 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_callouts.pl \
- -m ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -m ${mrw_datadir}/${MRW_XML} \
-o ${DEST}/callouts.yaml
}
diff --git a/meta-phosphor/common/recipes-phosphor/mrw/mrw-native.bb b/meta-phosphor/common/recipes-phosphor/mrw/mrw-native.bb
index 12a9b9e78d..db9cbd9027 100644
--- a/meta-phosphor/common/recipes-phosphor/mrw/mrw-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/mrw/mrw-native.bb
@@ -7,13 +7,14 @@ S = "${WORKDIR}/git"
inherit obmc-phosphor-license
inherit obmc-xmlpatch
inherit native
+inherit mrw-xml
PHOSPHOR_MRW_URI ?= "http://missing-mrw-uri"
SRC_URI += "${PHOSPHOR_MRW_URI}"
SRCREV = "${PHOSPHOR_MRW_REV}"
do_install() {
- install -d ${D}${datadir}/obmc-mrw
- install -m 0644 ${MACHINE}.xml ${D}${datadir}/obmc-mrw
+ install -d ${D}/${mrw_datadir}
+ install -m 0644 ${MRW_XML} ${D}/${mrw_datadir}
}
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
index 7e016b51d6..c6d0cba731 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
@@ -4,13 +4,14 @@ PR = "r1"
inherit obmc-phosphor-license
inherit allarch
+inherit mrw-xml
DEPENDS += "mrw-perl-tools-native mrw-native"
do_compile_append() {
${STAGING_BINDIR_NATIVE}/perl-native/perl \
${STAGING_BINDIR_NATIVE}/hwmon.pl \
- -x ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+ -x ${mrw_datadir}/${MRW_XML} \
-d ${WORKDIR}/mrw-config-files
}
diff --git a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-read-settings-mrw.bb b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-read-settings-mrw.bb
index 7260434d3e..2080a3b6e7 100644
--- a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-read-settings-mrw.bb
+++ b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-read-settings-mrw.bb
@@ -7,6 +7,7 @@ PR = "r1"
inherit native
inherit phosphor-settings-manager
+inherit mrw-xml
inherit obmc-phosphor-license
@@ -26,7 +27,7 @@ do_install() {
# gen_settings.pl replaces any MRW variables with their value
${bindir}/perl-native/perl \
${bindir}/gen_settings.pl \
- -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-s ${DEST}/mrw-override-settings.yaml \
-o ${SETTINGS}/mrw-settings.override.yaml \
-f