diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-02-20 04:55:20 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-23 21:57:30 +0000 |
commit | 48be0fd82c11f3a32304d680b004e0191cfbb889 (patch) | |
tree | 74b30dc6af2b3503e50e21349295259190ab6bfe /meta-phosphor/common/recipes-phosphor | |
parent | 6f8fdabe9068570abecb135c4d81768263811c50 (diff) | |
download | talos-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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
5 files changed, 89 insertions, 1 deletions
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 \ + " |