From 1da8306113bde5207b98af534f702322919ca1fd Mon Sep 17 00:00:00 2001 From: Willy Tu Date: Thu, 7 Apr 2022 23:48:56 -0700 Subject: meta-google: ipmi-config: Add option to remove default entity config Currently it fources all gBMC to have `[]` as the entity-mapping config and will cause an issue to gBMC systems that uses the default mapping. Add a way to remove the default isntead of having all gBMC automatically remove it. ENTITY_MAPPING="default" ``` $ cat ./tmp/work/all-openbmc-linux/phosphor-ipmi-config/1.0-r1/package/usr/share/ipmi-providers/entity-map.json [ { "id": 0, "containerEntityId": 30, "containerEntityInstance": 0, "isList": false, "isLinked": false, "entities": [ { "id": 11, "instance": 3 }, { "id": 11, ... ``` ENTITY_MAPPING="no" ``` $ cat ./tmp/work/all-openbmc-linux/phosphor-ipmi-config/1.0-r1/package/usr/share/ipmi-providers/entity-map.json [] ``` Change-Id: I9adccc2685055bad8ac27207305083ba40327ce2 Signed-off-by: Willy Tu --- meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta-google') diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend index aa2e266718..58997eedc1 100644 --- a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend +++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -6,6 +6,8 @@ DEPENDS:append:gbmc = " jq-native" GBMCBR_IPMI_CHANNEL ?= "11" +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 @@ -21,6 +23,8 @@ do_install:append:gbmc() { # Set entity-map.json to empty json for gBMC by default. # Each system will override it if needed. - echo "[]" > ${D}${datadir}/ipmi-providers/entity-map.json + if [[ "${ENTITY_MAPPING}" != "default" ]]; then + echo "[]" > ${D}${datadir}/ipmi-providers/entity-map.json + fi } -- cgit v1.2.3