Generate OCC Sensor mapping during build time

Change-Id: Ieb0ba06bc8875af382b1f8e9ed38ec36eeaece48
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb b/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
new file mode 100644
index 0000000..aa831a5
--- /dev/null
+++ b/common/recipes-phosphor/occ/openpower-occ-control-config-mrw-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "OpenPower OCC Control with MRW generated sensor IDs"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-utils
+inherit obmc-phosphor-license
+inherit openpower-occ-control
+
+PROVIDES += "virtual/openpower-occ-control-config-native"
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install_append() {
+    install -d ${YAML_DEST}/
+    ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+    ${STAGING_BINDIR_NATIVE}/gen_occ_map.pl \
+    -i ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+    -o ${YAML_DEST}/occ_sensor.yaml
+}