summaryrefslogtreecommitdiff
path: root/meta-google
diff options
context:
space:
mode:
authorTom Tung <shes050117@.gmail.com>2022-03-31 10:16:41 +0300
committerWilliam A. Kennington III <wak@google.com>2022-04-16 06:36:17 +0300
commit4d433a45a90a245f0d2b1c3f5d05c18306037333 (patch)
treee7f79d36793f64a47693f226e42a509297b4d575 /meta-google
parent09696fc31cb5ddbcc5b19d8bdb491a08c5db55e9 (diff)
downloadopenbmc-4d433a45a90a245f0d2b1c3f5d05c18306037333.tar.xz
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
Diffstat (limited to 'meta-google')
-rw-r--r--meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend29
-rw-r--r--meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_access.json7
-rw-r--r--meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_config.json (renamed from meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge.json)0
3 files changed, 28 insertions, 8 deletions
diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
index 58997eedc1..2f2d9e0881 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 @@ ENTITY_MAPPING ?= "default"
# 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 @@ do_install:append:gbmc() {
echo "[]" > ${D}${datadir}/ipmi-providers/entity-map.json
fi
}
-
diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_access.json b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_access.json
new file mode 100644
index 0000000000..b7893b79fe
--- /dev/null
+++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_access.json
@@ -0,0 +1,7 @@
+{
+ "access_mode": "always_available",
+ "user_auth_disabled": false,
+ "per_msg_auth_disabled": false,
+ "alerting_disabled": false,
+ "priv_limit": "priv-admin"
+}
diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge.json b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_config.json
index f877283881..f877283881 100644
--- a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge.json
+++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config/gbmc_bridge_config.json