diff options
author | Willy Tu <wltu@google.com> | 2022-04-08 09:48:56 +0300 |
---|---|---|
committer | Willy Tu <wltu@google.com> | 2022-04-11 23:08:25 +0300 |
commit | 1da8306113bde5207b98af534f702322919ca1fd (patch) | |
tree | b74f34c992b4bbfa3c855fe356885e4d9228712b | |
parent | 5016236b3170b03e804d93d5b7f0425dd526f576 (diff) | |
download | openbmc-1da8306113bde5207b98af534f702322919ca1fd.tar.xz |
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 <wltu@google.com>
-rw-r--r-- | meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 6 |
1 files changed, 5 insertions, 1 deletions
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 } |