diff options
author | Allen.Wang <Allen_Wang@quantatw.com> | 2022-03-09 09:44:27 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-03-09 17:34:15 +0300 |
commit | 7298b2478ec25cc1814124af523acc4ffade05e6 (patch) | |
tree | 437d212df5d62e13c34158a66e685f0e85d4fe25 /meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb | |
parent | 97aaba86f436855ee81c6c403f902759ea7143e1 (diff) | |
download | openbmc-7298b2478ec25cc1814124af523acc4ffade05e6.tar.xz |
phosphor-settings-defaults: refactor defaults settings for multihost support
separate host items from defaults.yaml to host-template.yaml
add host items to defaults.yaml based on OBMC_HOST_INSTANCES to support multi-host.
TESTED:
a. build with default OBMC_HOST_INSTANCES="0"
`busctl tree xyz.openbmc_project.Settings`
└─/xyz
└─/xyz/openbmc_project
├─/xyz/openbmc_project/control
│ ├─/xyz/openbmc_project/control/host0
│ │ ├─/xyz/openbmc_project/control/host0/TPMEnable
│ │ ├─/xyz/openbmc_project/control/host0/auto_reboot
│ │ │ └─/xyz/openbmc_project/control/host0/auto_reboot/one_time
│ │ ├─/xyz/openbmc_project/control/host0/boot
│ │ │ └─/xyz/openbmc_project/control/host0/boot/one_time
│ │ ├─/xyz/openbmc_project/control/host0/power_cap
│ │ ├─/xyz/openbmc_project/control/host0/power_restore_policy
│ │ │ └─/xyz/openbmc_project/control/host0/power_restore_policy/one_time
│ │ ├─/xyz/openbmc_project/control/host0/restriction_mode
│ │ └─/xyz/openbmc_project/control/host0/turbo_allowed
│ ├─/xyz/openbmc_project/control/minimum_ship_level_required
│ ├─/xyz/openbmc_project/control/power_supply_attributes
│ └─/xyz/openbmc_project/control/power_supply_redundancy
├─/xyz/openbmc_project/logging
│ ├─/xyz/openbmc_project/logging/rest_api_logs
│ └─/xyz/openbmc_project/logging/settings
├─/xyz/openbmc_project/network
│ └─/xyz/openbmc_project/network/host0
│ └─/xyz/openbmc_project/network/host0/intf
│ └─/xyz/openbmc_project/network/host0/intf/addr
├─/xyz/openbmc_project/software
│ └─/xyz/openbmc_project/software/apply_time
└─/xyz/openbmc_project/time
└─/xyz/openbmc_project/time/sync_method
b. build with Bletchley platform: OBMC_HOST_INSTANCES = "1 2 3 4 5 6"
`busctl tree xyz.openbmc_project.Settings`
└─/xyz
└─/xyz/openbmc_project
├─/xyz/openbmc_project/control
│ ├─/xyz/openbmc_project/control/host1
│ │ ├─/xyz/openbmc_project/control/host1/TPMEnable
│ │ ├─/xyz/openbmc_project/control/host1/auto_reboot
│ │ │ └─/xyz/openbmc_project/control/host1/auto_reboot/one_time
│ │ ├─/xyz/openbmc_project/control/host1/boot
│ │ │ └─/xyz/openbmc_project/control/host1/boot/one_time
│ │ ├─/xyz/openbmc_project/control/host1/power_cap
│ │ ├─/xyz/openbmc_project/control/host1/power_restore_policy
│ │ │ └─/xyz/openbmc_project/control/host1/power_restore_policy/one_time
│ │ ├─/xyz/openbmc_project/control/host1/restriction_mode
│ │ └─/xyz/openbmc_project/control/host1/turbo_allowed
│ ├─/xyz/openbmc_project/control/host2
│ │ ├─/xyz/openbmc_project/control/host2/TPMEnable
│ │ ├─/xyz/openbmc_project/control/host2/auto_reboot
│ │ │ └─/xyz/openbmc_project/control/host2/auto_reboot/one_time
│ │ ├─/xyz/openbmc_project/control/host2/boot
│ │ │ └─/xyz/openbmc_project/control/host2/boot/one_time
│ │ ├─/xyz/openbmc_project/control/host2/power_cap
│ │ ├─/xyz/openbmc_project/control/host2/power_restore_policy
│ │ │ └─/xyz/openbmc_project/control/host2/power_restore_policy/one_time
│ │ ├─/xyz/openbmc_project/control/host2/restriction_mode
│ │ └─/xyz/openbmc_project/control/host2/turbo_allowed
│ ├─/xyz/openbmc_project/control/host3
(.......repeat util host6)
│ ├─/xyz/openbmc_project/control/minimum_ship_level_required
│ ├─/xyz/openbmc_project/control/power_supply_attributes
│ └─/xyz/openbmc_project/control/power_supply_redundancy
├─/xyz/openbmc_project/logging
│ ├─/xyz/openbmc_project/logging/rest_api_logs
│ └─/xyz/openbmc_project/logging/settings
├─/xyz/openbmc_project/network
│ ├─/xyz/openbmc_project/network/host1
│ │ └─/xyz/openbmc_project/network/host1/intf
│ │ └─/xyz/openbmc_project/network/host1/intf/addr
│ ├─/xyz/openbmc_project/network/host2
│ │ └─/xyz/openbmc_project/network/host2/intf
│ │ └─/xyz/openbmc_project/network/host2/intf/addr
│ ├─/xyz/openbmc_project/network/host3
│ │ └─/xyz/openbmc_project/network/host3/intf
│ │ └─/xyz/openbmc_project/network/host3/intf/addr
│ ├─/xyz/openbmc_project/network/host4
│ │ └─/xyz/openbmc_project/network/host4/intf
│ │ └─/xyz/openbmc_project/network/host4/intf/addr
│ ├─/xyz/openbmc_project/network/host5
│ │ └─/xyz/openbmc_project/network/host5/intf
│ │ └─/xyz/openbmc_project/network/host5/intf/addr
│ └─/xyz/openbmc_project/network/host6
│ └─/xyz/openbmc_project/network/host6/intf
│ └─/xyz/openbmc_project/network/host6/intf/addr
├─/xyz/openbmc_project/software
│ └─/xyz/openbmc_project/software/apply_time
└─/xyz/openbmc_project/time
└─/xyz/openbmc_project/time/sync_method
Change-Id: I4b70fb7e19647ea2ba5c985cb7c6bf851cb971b2
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb')
-rw-r--r-- | meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb index 77693af4dd..79fe68ab4a 100644 --- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb +++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-defaults-native.bb @@ -7,6 +7,7 @@ inherit phosphor-settings-manager inherit native SRC_URI += "file://defaults.yaml" +SRC_URI += "file://host-template.yaml" PROVIDES += "virtual/phosphor-settings-defaults" @@ -16,4 +17,10 @@ do_install() { DEST=${D}${settings_datadir} install -d ${DEST} install defaults.yaml ${DEST} + + for i in ${OBMC_HOST_INSTANCES}; + do + cat host-template.yaml | sed "s/{}/${i}/g" >> ${DEST}/defaults.yaml + + done } |