meta-quanta: gbs: add ipmi fru eeprom config

Add GBS related fru eeprom path and id

Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: Idec83e29d88b5527aa1e6597b9c508305361cad3
diff --git a/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/fan b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/fan
new file mode 100644
index 0000000..9bb4f2c
--- /dev/null
+++ b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/fan
@@ -0,0 +1,3 @@
+OF_NAME=fan_fru
+SYSFS_PATH=/no-such-path/eeprom
+FRUID=0x02
diff --git a/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/hsbp b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/hsbp
new file mode 100644
index 0000000..cb09997
--- /dev/null
+++ b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/hsbp
@@ -0,0 +1,3 @@
+OF_NAME=hsbp_fru
+SYSFS_PATH=/no-such-path/eeprom
+FRUID=0x01
diff --git a/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard
new file mode 100644
index 0000000..0b36379
--- /dev/null
+++ b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard
@@ -0,0 +1,3 @@
+OF_NAME=mb_fru
+SYSFS_PATH=/sys/bus/i2c/devices/5-0050/eeprom
+FRUID=0x00
diff --git a/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
new file mode 100644
index 0000000..8771297
--- /dev/null
+++ b/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
@@ -0,0 +1,26 @@
+inherit obmc-phosphor-systemd
+DEPENDS_append_gbs = " gbs-yaml-config"
+
+FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
+
+EEPROM_NAMES = "motherboard hsbp fan"
+
+EEPROMFMT = "system/chassis/{0}"
+EEPROM_ESCAPEDFMT = "system-chassis-{0}"
+EEPROMS = "${@compose_list(d, 'EEPROMFMT', 'EEPROM_NAMES')}"
+EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}"
+
+ENVFMT = "obmc/eeproms/{0}"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs := " ${@compose_list(d, 'ENVFMT', 'EEPROMS')}"
+
+TMPL = "obmc-read-eeprom@.service"
+TGT = "multi-user.target"
+INSTFMT = "obmc-read-eeprom@{0}.service"
+FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}"
+
+SYSTEMD_LINK_${PN}_append_gbs := " ${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}"
+
+EXTRA_OECONF_append_gbs = " \
+    YAML_GEN=${STAGING_DIR_HOST}${datadir}/gbs-yaml-config/ipmi-fru-read.yaml \
+    PROP_YAML=${STAGING_DIR_HOST}${datadir}/gbs-yaml-config/ipmi-extra-properties.yaml \
+    "