ipmi-fru: Add example configuration recipe

Add a native recipe that installs the (yet to be created) example
IPMI FRU parser configuration.

Change-Id: I8309e64254a12dd303e7eb5ef9482bd934c9ce6a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-config-example-native.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-config-example-native.bb
new file mode 100644
index 0000000..58c7a39
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-config-example-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor IPMI FRU Configuration Example"
+DESCRIPTION = "An example Phosphor IPMI FRU IPMI to \
+DBUS mapping configuration."
+
+PR = "r1"
+
+inherit native
+
+require phosphor-ipmi-fru.inc
+
+PROVIDES += "virtual/phosphor-ipmi-fru-config"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+        SRC=${S}/example-map.yaml
+        DEST=${D}${datadir}/phosphor-ipmi-fru
+
+        install -d ${DEST}
+        # TODO - install the example, once one is provided by ipmi-fru-parser.
+        # install-data ${SRC} ${DEST}
+}
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
index a434fb4..d053bce 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb
@@ -8,6 +8,7 @@
 require ${PN}.inc
 
 DEPENDS += " \
+        virtual/phosphor-ipmi-fru-config \
         systemd \
         phosphor-ipmi-host \
         phosphor-mapper \
diff --git a/conf/distro/include/phosphor-defaults.inc b/conf/distro/include/phosphor-defaults.inc
index e9f2781..f5263bb 100644
--- a/conf/distro/include/phosphor-defaults.inc
+++ b/conf/distro/include/phosphor-defaults.inc
@@ -22,5 +22,14 @@
 PREFERRED_PROVIDER_virtual/obmc-host-state-mgmt ?= "phosphor-state-manager"
 PREFERRED_PROVIDER_virtual/obmc-chassis-state-mgmt ?= "phosphor-state-manager"
 
+# virtual/phosphor-ipmi-fru-config
+#
+# The phosphor-ipmi-fru application is data-driven and requires an input
+# mapping of IPMI inventory metadata to DBus objects interfaces and properties.
+# 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 in the native sysroot.
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-config ?= "phosphor-ipmi-fru-config-example-native"
+
 OBMC_DBUS_PATH_ROOT ?= "/xyz/openbmc_project"
 OBMC_DBUS_IFACE_ROOT ?= "xyz.openbmc_project"