meta-quanta: Add meta-f0b machine

Initial introduction of Quanta F0B family equipped with Aspeed 2500 BMC SoC.

Tested: Build Quanta F0B board and load on the target hardware.
Ensure that BMC boots to console.

(From meta-quanta rev: b0d87650a1f20510596881a37c6a4424c6c5781a)

Change-Id: Ieb5aad2f897dc8fb1840e0db2929b9350e3fa063
Signed-off-by: PKLee-Quanta <p.k.lee@quantatw.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-fru-read-inventory-native.bb b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-fru-read-inventory-native.bb
new file mode 100644
index 0000000..89d8610
--- /dev/null
+++ b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-fru-read-inventory-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "F0B inventory map for phosphor-ipmi-host"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${QUANTABASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit native
+inherit phosphor-ipmi-host
+
+SRC_URI += "file://config.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
+
+S = "${WORKDIR}"
+
+do_install() {
+        DEST=${D}${config_datadir}
+        install -d ${DEST}
+        install config.yaml ${DEST}
+}
diff --git a/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-inventory-map-native.bb b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-inventory-map-native.bb
new file mode 100644
index 0000000..1831e59
--- /dev/null
+++ b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/f0b-ipmi-inventory-map-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "F0B IPMI to DBus Inventory mapping."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${QUANTABASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit native
+inherit phosphor-ipmi-fru
+
+SRC_URI += "file://config.yaml"
+
+PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
+
+S = "${WORKDIR}"
+
+do_install() {
+        DEST=${D}${config_datadir}
+        install -d ${DEST}
+        install config.yaml ${DEST}
+}
diff --git a/meta-quanta/meta-f0b/recipes-phosphor/ipmi/files/config.yaml b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/files/config.yaml
new file mode 100644
index 0000000..55d4890
--- /dev/null
+++ b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/files/config.yaml
@@ -0,0 +1,75 @@
+0x01:
+  /system:
+    entityID: 23
+    entityInstance: 1
+    interfaces:
+      xyz.openbmc_project.Inventory.Item:
+        PrettyName:
+          IPMIFruProperty: Name
+          IPMIFruSection: Product
+  /system/motherboard:
+    entityID: 7
+    entityInstance: 1
+    interfaces:
+      xyz.openbmc_project.Inventory.Decorator.Asset:
+        BuildDate:
+          IPMIFruProperty: Mfg Date
+          IPMIFruSection: Board
+        SerialNumber:
+          IPMIFruProperty: Serial Number
+          IPMIFruSection: Board
+        PartNumber:
+          IPMIFruProperty: Part Number
+          IPMIFruSection: Board
+        Manufacturer:
+          IPMIFruProperty: Manufacturer
+          IPMIFruSection: Board
+      xyz.openbmc_project.Inventory.Item:
+        PrettyName:
+          IPMIFruProperty: Name
+          IPMIFruSection: Board
+      xyz.openbmc_project.Inventory.Decorator.Revision:
+        Version:
+          IPMIFruProperty: FRU File ID
+          IPMIFruSection: Board
+  /system/motherboard/Self:
+    entityID: 7
+    entityInstance: 1
+    interfaces:
+      xyz.openbmc_project.Inventory.Decorator.Asset:
+        BuildDate:
+          IPMIFruProperty: Mfg Date
+          IPMIFruSection: Board
+        SerialNumber:
+          IPMIFruProperty: Serial Number
+          IPMIFruSection: Board
+        PartNumber:
+          IPMIFruProperty: Part Number
+          IPMIFruSection: Board
+        Manufacturer:
+          IPMIFruProperty: Manufacturer
+          IPMIFruSection: Board
+      xyz.openbmc_project.Inventory.Item:
+        PrettyName:
+          IPMIFruProperty: Name
+          IPMIFruSection: Board
+      xyz.openbmc_project.Inventory.Decorator.Revision:
+        Version:
+          IPMIFruProperty: FRU File ID
+          IPMIFruSection: Board
+      xyz.openbmc_project.Inventory.Item.Board:
+  /system/motherboard/product:
+    entityID: 7
+    entityInstance: 2
+    interfaces:
+      xyz.openbmc_project.Inventory.Item:
+        PrettyName:
+          IPMIFruProperty: Name
+          IPMIFruSection: Product
+      xyz.openbmc_project.Inventory.Decorator.Asset:
+        Manufacturer:
+          IPMIFruProperty: Manufacturer
+          IPMIFruSection: Product
+        PartNumber:
+          IPMIFruProperty: Model Number
+          IPMIFruSection: Product
diff --git a/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/motherboard b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/motherboard
new file mode 100644
index 0000000..94535b9
--- /dev/null
+++ b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/motherboard
@@ -0,0 +1,2 @@
+SYSFS_PATH=/sys/bus/i2c/devices/6-0054/eeprom
+FRUID=1
diff --git a/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
new file mode 100644
index 0000000..cc2c071
--- /dev/null
+++ b/meta-quanta/meta-f0b/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
@@ -0,0 +1,20 @@
+inherit obmc-phosphor-systemd
+
+FILESEXTRAPATHS_prepend_f0b := "${THISDIR}/${PN}:"
+
+EEPROM_NAMES = "motherboard "
+
+EEPROMFMT = "system/{0}"
+EEPROM_ESCAPEDFMT = "system-{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_f0b := " ${@compose_list(d, 'ENVFMT', 'EEPROMS')}"
+
+TMPL = "obmc-read-eeprom@.service"
+TGT = "${SYSTEMD_DEFAULT_TARGET}"
+INSTFMT = "obmc-read-eeprom@{0}.service"
+FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}"
+
+SYSTEMD_LINK_${PN}_append_f0b := " ${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}"