diff options
author | William A. Kennington III <wak@google.com> | 2023-10-19 02:12:42 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2023-10-27 00:46:54 +0300 |
commit | 54ae5fd0b6d21d387fd8f1c28c97d4dd19cade30 (patch) | |
tree | 300de1da7204cc31c8b60da4aa53c9e5a393de00 /meta-google | |
parent | cfcec1f6069ae5da2677b66041a1ccc9fec498da (diff) | |
download | openbmc-54ae5fd0b6d21d387fd8f1c28c97d4dd19cade30.tar.xz |
meta-google: phosphor-ipmi-config: Arbitrary channel mapping
This allows us to easily map in other NICs from a machine config.
Change-Id: Ib1aede5af75bfda30d11fd5f310b3ff096af86bb
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google')
-rw-r--r-- | meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend index 121562af93..782ebe36ef 100644 --- a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend +++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -9,6 +9,9 @@ DEPENDS:append:gbmc = " jq-native" GBMCBR_IPMI_CHANNEL ?= "11" GBMC_NCSI_IPMI_CHANNEL ??= "1" +# Only used for extra channels, GBMCBR and NCSI are autopopulated +# Format looks like "<channel>|<intf> <channel2>|<intf2>", Ex. "2|eth0 3|back" +GBMC_IPMI_CHANNEL_MAP ??= "" ENTITY_MAPPING ?= "default" @@ -46,6 +49,15 @@ do_install:append:gbmc() { if [ -n "${GBMC_NCSI_IF_NAME}" ]; then gbmc_add_channel ${GBMC_NCSI_IPMI_CHANNEL} ${GBMC_NCSI_IF_NAME} fi + map="${GBMC_IPMI_CHANNEL_MAP}" + # Split the map over the space separated entries + for entry in $map; do + OLDIFS="$IFS" + # Split the entry over the `|` separator + IFS='|' + gbmc_add_channel $entry + IFS="$OLDIFS" + done # Set entity-map.json to empty json for gBMC by default. # Each system will override it if needed. |