Providing infra for FRUs which are accessible through host but host is
not sending the details for those FRUs

- This commit adds a hand written YAML file that specifies IPMI FRU
information. It is for special case where FRU info is not coming as a
write-fru, it coming as a write-sensor from host because host doesn't
have the required i2c access to read the GPU FRU data.
- The YAML in this commit is mostly empty, and system specific overrides
are supposed to add appropriate content.

Partially Resolves openbmc/openbmc#3039

Change-Id: I20b43d1bb4c472dc590d254b72340fb19c52b811
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb
index dfedab2..a44774e 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-merge-config-native.bb
@@ -1,8 +1,8 @@
 SUMMARY = "To merge the Host and BMC config files generated from MRW "
-DESCRIPTION = "Merge host provided FRU info config file and \
-BMC accessible FRU info config files generated by \
-gen-ipmi-fru.pl into a single config file. fru-gen parser \
-parses the merged config file and generates cpp file"
+DESCRIPTION = "Merge host provided FRU info config file, fru info config, \
+which is not sent by host config, and BMC accessible FRU info config \
+files generated by gen-ipmi-fru.pl into a single config file. \
+fru-gen parser parses the merged config file and generates cpp file"
 PR = "r1"
 
 inherit native
@@ -11,6 +11,7 @@
 
 DEPENDS += "virtual/phosphor-ipmi-fru-read-inventory"
 DEPENDS += "virtual/phosphor-ipmi-fru-read-bmc-inventory"
+DEPENDS += "virtual/phosphor-ipmi-fru-read-not-sent-by-host-inventory"
 PROVIDES += "virtual/phosphor-ipmi-fru-merge-config"
 
 do_install_append() {
@@ -18,4 +19,5 @@
   DEST=${D}${config_datadir}
   install -d ${DEST}
   cat ${SRC}/config.yaml ${SRC}/bmc-fru-config.yaml > ${DEST}/fru_config.yaml
+  cat ${SRC}/fru-config-not-sent-by-host.yaml >> ${DEST}/fru_config.yaml
 }
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb
new file mode 100644
index 0000000..029e6a3
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "The inventory map of frus not sent by host for phosphor-ipmi-host"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-ipmi-host
+
+SRC_URI += "file://fru-config-not-sent-by-host.yaml"
+
+S = "${WORKDIR}"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-read-not-sent-by-host-inventory"
+
+do_install_append() {
+    DEST=${D}${config_datadir}
+    install -d ${DEST}
+    install fru-config-not-sent-by-host.yaml ${DEST}/fru-config-not-sent-by-host.yaml
+}
+
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml
new file mode 100644
index 0000000..9fa1fed
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-not-sent-by-host-inventory/fru-config-not-sent-by-host.yaml
@@ -0,0 +1,21 @@
+# A YAML similar to this sample would have to be generated, for eg with MRW
+# inputs and system configuration, to depict IPMI FRU information.
+#
+# This file maps phosphor dbus inventory properties to IPMI properties
+#
+# This YAML could help generate C++ code.
+# Format of the YAML:
+# Fruid:
+#   Associated Fru paths
+#     d-bus Interfaces
+#       d-bus Properties
+#         IPMI Fru mapping
+#20:
+#  /system/chassis/motherboard/gv100card0:
+#    entityID: 3
+#    entityInstance: 1
+#    interfaces:
+#      xyz.openbmc_project.Inventory.Item:
+#        PrettyName:
+#          IPMIFruProperty: Board Name
+#          IPMIFruSection: Board