summaryrefslogtreecommitdiff
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
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>
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb3
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb3
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb3
-rw-r--r--meta-phosphor/classes/mrw-xml.bbclass2
-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
17 files changed, 36 insertions, 17 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
index aa831a58a..887b74163 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
@@ -5,6 +5,7 @@ inherit native
inherit obmc-phosphor-utils
inherit obmc-phosphor-license
inherit openpower-occ-control
+inherit mrw-xml
PROVIDES += "virtual/openpower-occ-control-config-native"
DEPENDS += "mrw-native mrw-perl-tools-native"
@@ -14,6 +15,6 @@ do_install_append() {
install -d ${YAML_DEST}/
${STAGING_BINDIR_NATIVE}/perl-native/perl \
${STAGING_BINDIR_NATIVE}/gen_occ_map.pl \
- -i ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+ -i ${mrw_datadir}/${MRW_XML} \
-o ${YAML_DEST}/occ_sensor.yaml
}
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
index 01ed362d6..6eb76ac4e 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit openpower-fru-vpd
+inherit mrw-xml
DEPENDS += " \
mrw-native \
@@ -21,7 +22,7 @@ do_install() {
${bindir}/perl-native/perl \
${bindir}/gen_openpower_fru.pl \
- -m ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -m ${mrw_datadir}/${MRW_XML} \
-c ${vpdlayout_datadir}/layout.yaml \
-o ${DEST}/inventory
}
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb
index 71194848d..2dc5820e3 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-properties-mrw-native.bb
@@ -4,6 +4,7 @@ PR = "r1"
inherit native
inherit obmc-phosphor-license
inherit openpower-fru-vpd
+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}/out.yaml
}
diff --git a/meta-phosphor/classes/mrw-xml.bbclass b/meta-phosphor/classes/mrw-xml.bbclass
new file mode 100644
index 000000000..5a9c773ae
--- /dev/null
+++ b/meta-phosphor/classes/mrw-xml.bbclass
@@ -0,0 +1,2 @@
+MRW_XML ??= "${MACHINE}.xml"
+mrw_datadir = "${datadir}/obmc-mrw"
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 1eadadf52..7ae05ce80 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 9d19847f3..47dc2a4a1 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 baab633c4..db3a5b404 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 0c512fcb4..795c9b9c9 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 0d250e7a0..0a1c8bd1d 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 5b0ca6041..3c5e36fce 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 b8529378c..f04d89f7d 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 a9955fe13..67c6996db 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 fb3259b4a..ef1403096 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 49816260a..96852d4ca 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 12a9b9e78..db9cbd902 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 7e016b51d..c6d0cba73 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 7260434d3..2080a3b6e 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