summaryrefslogtreecommitdiff
path: root/meta-facebook/recipes-phosphor/ipmi
diff options
context:
space:
mode:
authorPotin Lai <potin.lai@quantatw.com>2023-12-28 19:33:33 +0300
committerPatrick Williams <patrick@stwcx.xyz>2024-01-02 15:57:40 +0300
commit18258f0c2035734d41a13d34626984132c91f715 (patch)
tree4f79b6d8c085a0805f119c59aa61dc49c190ebf8 /meta-facebook/recipes-phosphor/ipmi
parentacae1a1a9fe3a1bdeef3d7546385c48172c6202a (diff)
downloadopenbmc-18258f0c2035734d41a13d34626984132c91f715.tar.xz
meta-facebook: add ability to set remote-addr in ipmb config
Some platforms will need to assign different remote-addr for each channel. Add a IPMB_REMOTE_ADDR for assigning remote-addr for each corresponding channel instead of assign fixed remote-addr to all channels. If the size of IPMB_REMOTE_ADDR not consistent and less than the size of IPMB_CHANNEL, the remote-addr will be filled with 64 for the channels does not assigned. Test results of tiogapass: ``` { "channels": [ { "type": "ipmb", "slave-path": "/dev/ipmb-4", "bmc-addr": 32, "remote-addr": "44", "devIndex": 0 }, { "type": "ipmb", "slave-path": "/dev/ipmb-9", "bmc-addr": 32, "remote-addr": "96", "devIndex": 1 } ] } ``` Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I785201c2c643cf6aa7b83e61df9601ae581f34ad
Diffstat (limited to 'meta-facebook/recipes-phosphor/ipmi')
-rw-r--r--meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index c064394c63..e0723321b7 100644
--- a/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-facebook/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -1,18 +1,21 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
IPMB_CHANNELS ?= ""
+IPMB_REMOTE_ADDR ?= ""
python do_ipmb_channels() {
import json
channels = []
+ ipmb_channel = d.getVar('IPMB_CHANNELS').split()
+ ipmb_remote_addr = d.getVar('IPMB_REMOTE_ADDR').split()
- for channel in d.getVar('IPMB_CHANNELS').split():
+ for i in range(len(ipmb_channel)):
channels.append({
"type": "ipmb",
- "slave-path": channel,
+ "slave-path": ipmb_channel[i],
"bmc-addr": 32,
- "remote-addr": 64,
- "devIndex": len(channels)
+ "remote-addr": ipmb_remote_addr[i] if i < len(ipmb_remote_addr) else 64,
+ "devIndex": i
})
data = { "channels" : channels }