meta-google: phosphor-ipmi-config: ensure gbmcbr access available
Ensure channel_access for gbmcbr is set as well.
Tested:
Checked the channel access for gbmcbr and it's always available.
```
$ ipmitool channel info 11
Channel 0xb info:
Channel Medium Type : 802.3 LAN
Channel Protocol Type : IPMB-1.0
Session Support : multi-session
Active Session Count : 0
Protocol Vendor ID : 7154
Volatile(active) Settings
Alerting : enabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
Non-Volatile Settings
Alerting : enabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
```
Signed-off-by: Tom Tung <shes050117@gmail.com>
Change-Id: If385b63fe15f35cc72b6863fea5f3172ef08bc8a
diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
index 58997ee..2f2d9e0 100644
--- a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
+++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -1,6 +1,9 @@
FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:"
-SRC_URI:append:gbmc = " file://gbmc_bridge.json"
+SRC_URI:append:gbmc = " \
+ file://gbmc_bridge_config.json \
+ file://gbmc_bridge_access.json \
+"
DEPENDS:append:gbmc = " jq-native"
@@ -10,16 +13,27 @@
# Replace a channel in config.json to add gbmcbr reporting
do_install:append:gbmc() {
- chjson=${D}${datadir}/ipmi-providers/channel_config.json
- overlapping="$(jq '."${GBMCBR_IPMI_CHANNEL}" | .is_valid and .name != "gbmcbr"' $chjson)"
+ config_json=${D}${datadir}/ipmi-providers/channel_config.json
+ overlapping="$(jq '."${GBMCBR_IPMI_CHANNEL}" | .is_valid and .name != "gbmcbr"' $config_json)"
if [ "$overlapping" != "false" ]; then
echo "gBMC channel config overlaps on ${GBMCBR_IPMI_CHANNEL}" >&2
- cat $chjson
+ cat $config_json
exit 1
fi
- jq --slurpfile brcfg ${WORKDIR}/gbmc_bridge.json \
- '. + {"${GBMCBR_IPMI_CHANNEL}": $brcfg[0]}' $chjson >${WORKDIR}/tmp
- mv ${WORKDIR}/tmp $chjson
+ jq --slurpfile brcfg ${WORKDIR}/gbmc_bridge_config.json \
+ '. + {"${GBMCBR_IPMI_CHANNEL}": $brcfg[0]}' $config_json >${WORKDIR}/tmp
+ mv ${WORKDIR}/tmp $config_json
+
+ access_json=${D}${datadir}/ipmi-providers/channel_access.json
+ overlapping="$(jq '."${GBMCBR_IPMI_CHANNEL}" | .access_mode and .access_mode != "always_available"' $access_json)"
+ if [ "$overlapping" != "false" ]; then
+ echo "gBMC channel access overlaps on ${GBMCBR_IPMI_CHANNEL}" >&2
+ cat $access_json
+ exit 1
+ fi
+ jq --slurpfile brcfg ${WORKDIR}/gbmc_bridge_access.json \
+ '. + {"${GBMCBR_IPMI_CHANNEL}": $brcfg[0]}' $access_json >${WORKDIR}/tmp
+ mv ${WORKDIR}/tmp $access_json
# Set entity-map.json to empty json for gBMC by default.
# Each system will override it if needed.
@@ -27,4 +41,3 @@
echo "[]" > ${D}${datadir}/ipmi-providers/entity-map.json
fi
}
-