common: create initial associations

Associations to the inventory item were created during the update
process but not for the initial software version.

```
common/src/device.cpp
206:        co_await softwarePending->createInventoryAssociations(true);
212:        co_await softwarePending->createInventoryAssociations(false);
```

Fix this in the common code.

Also reorder the calls there so the interfaces added signal gets emitted
with the correct property value.

Tested: on Tyan S8030. Association appears as expected.
Re-Tested for Patchset 3, same result.

```
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: [Software] enabling update of /xyz/openbmc_project/software/HostSPIFlash_3216 (adding the update interface)
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: set version Unknown
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: setting association definitions
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: inventory item at path /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: found associated inventory item for HostSPIFlash: /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: HostSPIFlash_3216: creating 'running' association to /xyz/openbmc_project/inventory/system/board/chassis
Jul 23 12:19:08 s8030-bmc-30303035c0c1 phosphor-bios-software-update[32158]: Done with initial configuration
```

```
busctl get-property xyz.openbmc_project.Software.BIOS /xyz/openbmc_project/software/HostSPIFlash_3216 xyz.openbmc_project.Association.Definitions Associations
a(sss) 1 "running" "ran_on" "/xyz/openbmc_project/inventory/system/board/chassis"
```

The signal is emitted correctly for object mapper as well
```
object path "/xyz/openbmc_project/software/HostSPIFlash_3216"
   array [
      dict entry(
         string "xyz.openbmc_project.Association.Definitions"
         array [
            dict entry(
               string "Associations"
               variant                   array [
                     struct {
                        string "running"
                        string "ran_on"
                        string "/xyz/openbmc_project/inventory/system/board/chassis"
                     }
                  ]
            )
         ]
      )
   ]
```

Change-Id: Ie3d76d3bdf445a53c578c3a827b90950fa4bda0a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2 files changed
tree: e55749c80684c9a52051d27830b2a226b8bbfbf6
  1. bios/
  2. bmc/
  3. common/
  4. cpld/
  5. eeprom-device/
  6. i2c-vr/
  7. subprojects/
  8. test/
  9. .clang-format
  10. .clang-tidy
  11. .gitignore
  12. .shellcheck
  13. LICENSE
  14. meson.build
  15. meson.options
  16. OWNERS
  17. README.md
README.md

phosphor-bmc-code-mgmt

Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture

To Build

To build this package, do the following steps:

  1. meson build
  2. ninja -C build

To clean the repository run rm -r build.