diff options
Diffstat (limited to 'meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend')
-rw-r--r-- | meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 22 |
1 files changed, 22 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 new file mode 100644 index 000000000..03e99b2d0 --- /dev/null +++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_prepend_gbmc := "${THISDIR}/${PN}:" + +SRC_URI_append_gbmc = " file://gbmc_bridge.json" + +DEPENDS_append_gbmc = " jq-native" + +GBMCBR_IPMI_CHANNEL ?= "11" + +# 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)" + if [ "$overlapping" != "false" ]; then + echo "gBMC channel config overlaps on ${GBMCBR_IPMI_CHANNEL}" >&2 + cat $chjson + exit 1 + fi + jq --slurpfile brcfg ${WORKDIR}/gbmc_bridge.json \ + '. + {"${GBMCBR_IPMI_CHANNEL}": $brcfg[0]}' $chjson >${WORKDIR}/tmp + mv ${WORKDIR}/tmp $chjson +} + |