Add native recipe to generate inventory map from MRW
Resolves openbmc/openbmc#1559
Change-Id: I3c663693df78cdf8daac83d49ca35982be27165a
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb
new file mode 100644
index 0000000..6393f95
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru-read-inventory-mrw-native.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Generate inventory map for phosphor-ipmi-host from a MRW."
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-host
+
+require phosphor-ipmi-host.inc
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
+PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
+
+do_install() {
+
+ DEST=${D}${config_datadir}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_ipmi_fru.pl \
+ -i ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -m ${hostfw_datadir}/config.yaml \
+ -o ${DEST}/config.yaml
+}