meta-quanta: gbs: add GBS Entity Association Map
Add entity association map for Google OEM
IPMI command (get entity name)
Tested:
For example, get entity name, "fan0":
~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x06 0x1d 0x00
79 2b 00 06 05 2f 66 61 6e 30
(From meta-quanta rev: 52ce287bfcb8c7a4cdeb07fcd80903af5a0dd26b)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I173da270c29745518293133597a5a389d17bf1ce
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/files/entity_association_map.json b/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/files/entity_association_map.json
new file mode 100644
index 0000000..a0992b7
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/files/entity_association_map.json
@@ -0,0 +1,29 @@
+{
+ "system_board": [
+ {"instance": 1, "name": "/"},
+ {"instance": 28, "name": "/i2cool_0"},
+ {"instance": 29, "name": "/i2cool_1"},
+ {"instance": 30, "name": "/i2cool_2"}
+ ],
+ "system_internal_expansion_board": [
+ {"instance": 1, "name": "/"}
+ ],
+ "power_system_board": [
+ {"instance": 1, "name": "/"}
+ ],
+ "add_in_card": [
+ {"instance": 0, "name": "/PE0"},
+ {"instance": 1, "name": "/PE1"}
+ ],
+ "fan": [
+ {"instance": 0, "name": "/fan0"},
+ {"instance": 1, "name": "/fan1"},
+ {"instance": 2, "name": "/fan2"},
+ {"instance": 3, "name": "/fan3"},
+ {"instance": 4, "name": "/fan4"}
+ ],
+ "cooling_unit": [
+ {"instance": 0, "name": "/ZONE0"},
+ {"instance": 1, "name": "/ZONE1"}
+ ]
+}
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/gbs-ipmi-entity-association-map.bb b/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/gbs-ipmi-entity-association-map.bb
new file mode 100644
index 0000000..8b5551e
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-ipmi-entity-association-map/gbs-ipmi-entity-association-map.bb
@@ -0,0 +1,16 @@
+SUMMARY = "GBS IPMI Entity association mapping."
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI += "file://entity_association_map.json"
+
+FILES_${PN} = " \
+ ${datadir}/ipmi-entity-association/entity_association_map.json \
+ "
+
+do_install() {
+ install -d ${D}${datadir}/ipmi-entity-association
+ install -m 0644 -D ${WORKDIR}/entity_association_map.json \
+ ${D}${datadir}/ipmi-entity-association/entity_association_map.json
+}