meta-quanta: gbs: add ipmi fru eeprom config
Add GBS related fru eeprom path and id
(From meta-quanta rev: 904b35a20462dca720a48c225c5a193a3888e408)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I1e8b76d6c5f48b85ad0482857b083d8843c05e39
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/fan b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/fan
new file mode 100644
index 0000000..9bb4f2c
--- /dev/null
+++ b/meta-quanta/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-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/hsbp b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/hsbp
new file mode 100644
index 0000000..cb09997
--- /dev/null
+++ b/meta-quanta/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-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard
new file mode 100644
index 0000000..0b36379
--- /dev/null
+++ b/meta-quanta/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-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
new file mode 100644
index 0000000..8771297
--- /dev/null
+++ b/meta-quanta/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 \
+ "