From 48be0fd82c11f3a32304d680b004e0191cfbb889 Mon Sep 17 00:00:00 2001 From: Deepak Kodihalli Date: Mon, 20 Feb 2017 04:55:20 -0600 Subject: 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 --- .../phosphor-ipmi-fru-properties-example-native.bb | 22 +++++++++++++++++ .../phosphor-ipmi-fru-properties-example/out.yaml | 11 +++++++++ .../phosphor-ipmi-fru-properties-mrw-native.bb | 28 ++++++++++++++++++++++ .../phosphor-ipmi-fru-properties-mrw/config.yaml | 23 ++++++++++++++++++ .../recipes-phosphor/ipmi/phosphor-ipmi-fru.bb | 6 ++++- 5 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example-native.bb create mode 100644 meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-example/out.yaml create mode 100644 meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw-native.bb create mode 100644 meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-properties-mrw/config.yaml (limited to 'meta-phosphor/common/recipes-phosphor/ipmi') 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 \ + " -- cgit v1.2.1