ipmi: Add virtual/phosphor-ipmi-fru-hostfw-config
This virtual provides a configuration file that describes
host firmware implementation details to ipmi-fru-parser.
Add a recipe that provides the sample that comes with
ipmi-fru-parser.
Add a recipe for Hostboot on OpenPower systems.
Set the default provider to the example.
Set the default on OpenPOWER systems to the hostboot recipe.
Change-Id: Iff56c5c0c2ea8aec7ecaa5a5d981da6f88a894f2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb
new file mode 100644
index 0000000..31aee2d
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Hostboot hostfw inventory map for phosphor-ipmi-fru"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-fru
+inherit obmc-phosphor-license
+
+SRC_URI += "file://config.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${hostfw_datadir}
+
+ install -d ${DEST}
+ install config.yaml ${DEST}
+}
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml
new file mode 100644
index 0000000..ff7eec4
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/hostboot-inventory-config/config.yaml
@@ -0,0 +1,83 @@
+PROC:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Product Name"
+
+SYS:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Product Name"
+ xyz.openbmc_project.Inventory.Revision:
+ Version:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Version"
+
+DIMM:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Product Name"
+ xyz.openbmc_project.Inventory.Revision:
+ Version:
+ IPMIFruSection: Product
+ IPMIFruProperty: "Version"
+
+MEMBUFF:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Mfg Date"
+ Manufacturer:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Manufacturer"
+ PartNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Part Number"
+ SerialNumber:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Serial Number"
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruSection: Board
+ IPMIFruProperty: "Product Name"
diff --git a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
index d6efd6c..dd90dcc 100644
--- a/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
+++ b/meta-openbmc-machines/meta-openpower/conf/machine/include/openpower.inc
@@ -21,3 +21,4 @@
PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-op-apps"
PREFERRED_PROVIDER_virtual/obmc-host-ctl ?= "obmc-op-control-host"
PREFERRED_PROVIDER_virtual/obmc-inventory-data ?= "${VIRTUAL-RUNTIME_skeleton_workbook}"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "hostboot-inventory-config-native"
diff --git a/meta-phosphor/classes/phosphor-ipmi-fru.bbclass b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
new file mode 100644
index 0000000..d76bbc6
--- /dev/null
+++ b/meta-phosphor/classes/phosphor-ipmi-fru.bbclass
@@ -0,0 +1 @@
+hostfw_datadir="${datadir}/phosphor-ipmi-fru/hostfw"
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native.bb
new file mode 100644
index 0000000..aca1d0a
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-hostfw-config-example-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Sample hostfw inventory map for phosphor-ipmi-fru"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-fru
+
+require phosphor-ipmi-fru.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-hostfw-config"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ DEST=${D}${hostfw_datadir}
+ install -d ${DEST}
+
+ # TODO: copy example hostfw yaml to ${DEST}/config.yaml
+ # install fru-types.yaml ${DEST}/config.yaml
+}
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 1740c7e..221e960 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -33,5 +33,14 @@
# the phosphor-ipmi-fru build process in the native sysroot.
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-config ?= "phosphor-ipmi-fru-config-example-native"
+# virtual/phosphor-ipmi-fru-hostfw-config
+#
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of how the host firmware reports inventory via IPMI.
+# This virtual is a native recipe that provides that mapping by installing
+# configuration files in the format and native sysroot location expected by
+# the phosphor-ipmi-fru build process.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-hostfw-config ?= "phosphor-ipmi-fru-hostfw-config-example-native"
+
OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"