Add virtual/openpower-fru-inventory
This virtual provides an environment file that serves as inventory
configuration for openpower-vpd-parser.
Add a native recipe that builds the configuration from MRW. Set this
recipe as the default for OpenPOWER systems.
Change-Id: I88c1d4123d73a5cdf37cba8efda40107f7b9ef25
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb b/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
new file mode 100644
index 0000000..01ed362
--- /dev/null
+++ b/common/recipes-phosphor/vpd/openpower-fru-inventory-mrw-native.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Inventory config for openpower-vpd-parser"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit openpower-fru-vpd
+
+DEPENDS += " \
+ mrw-native \
+ mrw-perl-tools-native \
+ virtual/openpower-fru-vpd-layout \
+ "
+
+PROVIDES += "virtual/openpower-fru-inventory"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${inventory_datadir_native}
+ install -d ${DEST}
+
+ ${bindir}/perl-native/perl \
+ ${bindir}/gen_openpower_fru.pl \
+ -m ${datadir}/obmc-mrw/${MACHINE}.xml \
+ -c ${vpdlayout_datadir}/layout.yaml \
+ -o ${DEST}/inventory
+}