meta-romulus: Add ipmi inventory sel config
phosphor-ipmi-inventory-sel provides a yaml config for sel events, and
Romulus was using the default one, which makes the sel events not
mapping to the expected devices.
Provide a yaml config that matches Romulus system.
Tested: Inject error and check SEL logs are correctly parsed by
openbmctool.py in openbmc-tools/thalerj.
Change-Id: Ic2a03a34e98bb383e32ef902f1a5da1d6ee6fe9e
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/conf/machine/romulus.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/conf/machine/romulus.conf
index d45211c..14778f6 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/conf/machine/romulus.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/conf/machine/romulus.conf
@@ -16,4 +16,5 @@
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory = "romulus-ipmi-inventory-map-native"
PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "romulus-led-manager-config-native"
PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-read-inventory = "romulus-ipmi-fru-read-inventory-native"
+PREFERRED_PROVIDER_virtual/phosphor-ipmi-inventory-sel = "romulus-ipmi-inventory-sel-native"
PREFERRED_PROVIDER_virtual/phosphor-logging-callouts = "romulus-phosphor-logging-callouts-native"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/files/sel-config.yaml b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/files/sel-config.yaml
new file mode 100755
index 0000000..9a5189a
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/files/sel-config.yaml
@@ -0,0 +1,340 @@
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0:
+ sensorID: 0x0B
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1:
+ sensorID: 0x0C
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10:
+ sensorID: 0x15
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11:
+ sensorID: 0x16
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm12:
+ sensorID: 0x17
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm13:
+ sensorID: 0x18
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm14:
+ sensorID: 0x19
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm15:
+ sensorID: 0x1A
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm2:
+ sensorID: 0x0D
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm3:
+ sensorID: 0x0E
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm4:
+ sensorID: 0x0F
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm5:
+ sensorID: 0x10
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm6:
+ sensorID: 0x11
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm7:
+ sensorID: 0x12
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm8:
+ sensorID: 0x13
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm9:
+ sensorID: 0x14
+ sensorType: 0x0C
+ eventReadingType: 0x6F
+ offset: 0x04
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0:
+ sensorID: 0x08
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0:
+ sensorID: 0x2B
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1:
+ sensorID: 0x2C
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core2:
+ sensorID: 0x2D
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core3:
+ sensorID: 0x2E
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core4:
+ sensorID: 0x2F
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core5:
+ sensorID: 0x30
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core6:
+ sensorID: 0x31
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core7:
+ sensorID: 0x32
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core8:
+ sensorID: 0x33
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core9:
+ sensorID: 0x34
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10:
+ sensorID: 0x35
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11:
+ sensorID: 0x36
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12:
+ sensorID: 0x37
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core13:
+ sensorID: 0x38
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core14:
+ sensorID: 0x39
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core15:
+ sensorID: 0x3A
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core16:
+ sensorID: 0x3B
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core17:
+ sensorID: 0x3C
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core18:
+ sensorID: 0x3D
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core19:
+ sensorID: 0x3E
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core20:
+ sensorID: 0x3F
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core21:
+ sensorID: 0x40
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core22:
+ sensorID: 0x41
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core23:
+ sensorID: 0x42
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1:
+ sensorID: 0x09
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core0:
+ sensorID: 0x43
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core1:
+ sensorID: 0x44
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core2:
+ sensorID: 0x45
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core3:
+ sensorID: 0x46
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core4:
+ sensorID: 0x47
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core5:
+ sensorID: 0x48
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core6:
+ sensorID: 0x49
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core7:
+ sensorID: 0x4A
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core8:
+ sensorID: 0x4B
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core9:
+ sensorID: 0x4C
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core10:
+ sensorID: 0x4D
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core11:
+ sensorID: 0x4E
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core12:
+ sensorID: 0x4F
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core13:
+ sensorID: 0x50
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core14:
+ sensorID: 0x51
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core15:
+ sensorID: 0x52
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core16:
+ sensorID: 0x53
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core17:
+ sensorID: 0x54
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core18:
+ sensorID: 0x55
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core19:
+ sensorID: 0x56
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core20:
+ sensorID: 0x57
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core21:
+ sensorID: 0x58
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core22:
+ sensorID: 0x59
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core23:
+ sensorID: 0x5A
+ sensorType: 0x07
+ eventReadingType: 0x6F
+ offset: 0x08
+/xyz/openbmc_project/inventory/system/chassis/motherboard:
+ sensorID: 0x8C
+ sensorType: 0xC7
+ eventReadingType: 0x03
+ offset: 0x00
+/xyz/openbmc_project/inventory/system:
+ sensorID: 0x90
+ sensorType: 0x12
+ eventReadingType: 0x6F
+ offset: 0x02
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/romulus-ipmi-inventory-sel-native.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/romulus-ipmi-inventory-sel-native.bb
new file mode 100644
index 0000000..93907c8
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/ipmi/romulus-ipmi-inventory-sel-native.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Inventory to Sensor config for Romulus"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-host
+inherit obmc-phosphor-license
+
+PROVIDES += "virtual/phosphor-ipmi-inventory-sel"
+
+SRC_URI += "file://sel-config.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+ install sel-config.yaml ${DEST}/invsensor.yaml
+}