phosphor-ipmi-fru: Add eeprom detection by OF name

This allows us to provide names without hardcoding an i2c bus path.

Change-Id: I402cc5e0696bf328acdfc58c222b055557930857
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb b/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb
index d79078a..7d80342 100644
--- a/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb
+++ b/recipes-phosphor/ipmi/phosphor-ipmi-fru_git.bb
@@ -25,12 +25,17 @@
         cli11 \
         "
 
+RDEPENDS_${PN} += "bash"
+
+SRC_URI += "file://of-name-to-eeprom.sh"
+
 SYSTEMD_SERVICE_${PN} += "obmc-read-eeprom@.service"
 
 S = "${WORKDIR}/git"
 
 HOSTIPMI_PROVIDER_LIBRARY += "libstrgfnhandler.so"
 
+FILES_${PN} += "${bindir}/of-name-to-eeprom.sh"
 FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
 FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
 FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
@@ -39,3 +44,8 @@
              YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/config.yaml \
              PROP_YAML=${STAGING_DIR_NATIVE}${properties_datadir}/extra-properties.yaml \
              "
+
+do_install_append() {
+        install -d ${D}${bindir}
+        install -m 0755 ${WORKDIR}/of-name-to-eeprom.sh ${D}${bindir}
+}