summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-02-20 04:55:20 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-02-23 21:57:30 +0000
commit48be0fd82c11f3a32304d680b004e0191cfbb889 (patch)
tree74b30dc6af2b3503e50e21349295259190ab6bfe
parent6f8fdabe9068570abecb135c4d81768263811c50 (diff)
downloadtalos-openbmc-48be0fd82c11f3a32304d680b004e0191cfbb889.tar.gz
talos-openbmc-48be0fd82c11f3a32304d680b004e0191cfbb889.zip
Add virtual/phosphor-ipmi-fru-properties
This virtual provides an output file in YAML format, which has property:value pairs for FRUs of interest. Add a native recipe that builds the configuration from MRW. Set this recipe as the default for OpenPOWER systems. Change-Id: Icc816b777189a48aff79a958f38ad22d7002bfdc Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r--meta-phosphor/classes/phosphor-ipmi-fru.bbclass1
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example-native.bb22
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example/out.yaml11
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb28
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml23
-rw-r--r--meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb6
-rw-r--r--meta-phosphor/conf/distro/include/phosphor-defaults.inc2
7 files changed, 92 insertions, 1 deletions
diff --git a/meta-phosphor/classes/phosphor-ipmi-fru.bbclass b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
index 9c0d227c4..d833eafcd 100644
--- a/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
+++ b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
@@ -1,3 +1,4 @@
hostfw_datadir="${datadir}/phosphor-ipmi-fru/hostfw"
inventory_datadir="${datadir}/phosphor-ipmi-fru/inventory"
config_datadir="${datadir}/phosphor-ipmi-fru/config"
+properties_datadir="${datadir}/phosphor-ipmi-fru/properties"
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example-native.bb
new file mode 100644
index 000000000..200dcd7b2
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "FRU properties config for ipmi-fru-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-ipmi-fru
+
+SRC_URI += "file://out.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-properties"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe is supposed to create an output yaml file with
+ # FRU property values extracted from the MRW. This example recipe
+ # provides a sample output file.
+
+ DEST=${D}${properties_datadir}
+ install -d ${DEST}
+ install out.yaml ${DEST}
+}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example/out.yaml b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example/out.yaml
new file mode 100644
index 000000000..626ef33b8
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example/out.yaml
@@ -0,0 +1,11 @@
+/system/chassis/motherboard/cpu0:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'true'
+
+/system/chassis/motherboard/dimm0:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'true'
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
new file mode 100644
index 000000000..2188f043a
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb
@@ -0,0 +1,28 @@
+SUMMARY = "FRU properties config for ipmi-fru-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-ipmi-fru
+
+SRC_URI += "file://config.yaml"
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ "
+
+PROVIDES += "virtual/phosphor-ipmi-fru-properties"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${properties_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_fru_properties.pl \
+ -m ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -c config.yaml \
+ -o ${DEST}/out.yaml
+}
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml
new file mode 100644
index 000000000..eb6264869
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml
@@ -0,0 +1,23 @@
+PROC:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+DIMM:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+
+SYS:
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'false'
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'false'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
index 16e26df8f..e99d16b6f 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
@@ -13,6 +13,7 @@ require ${PN}.inc
DEPENDS += " \
virtual/phosphor-ipmi-fru-hostfw-config\
virtual/phosphor-ipmi-fru-inventory \
+ virtual/phosphor-ipmi-fru-properties \
systemd \
sdbusplus \
python-mako-native \
@@ -43,4 +44,7 @@ FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/
# EXTRA_OECONF += "HOSTFW_YAML=${hostfw_datadir}/config.yaml"
#
# For now the generator requires them to already be combined so we have:
-EXTRA_OECONF = "YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/config.yaml"
+EXTRA_OECONF = " \
+ YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/config.yaml \
+ PROP_YAML=${STAGING_DIR_NATIVE}${properties_datadir}/out.yaml \
+ "
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 4c3ec5c8b..64309d15a 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -70,6 +70,8 @@ PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "phosphor-ipmi-fru
# the phosphor-ipmi-fru build process in the native sysroot.
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory ?= \
"${@cf_enabled(d, 'obmc-mrw', 'phosphor-ipmi-fru-inventory-mrw-native', 'phosphor-ipmi-fru-inventory-example-native')}"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-properties ?= \
+ "${@cf_enabled(d, 'obmc-mrw', 'phosphor-ipmi-fru-properties-mrw-native', 'phosphor-ipmi-fru-properties-example-native')}"
OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"
OpenPOWER on IntegriCloud