| commit | 8b4ab1e4402dadb5cbd1a1e41298a522ac16e69d | [log] [tgz] |
|---|---|---|
| author | Alexander Hansen <alexander.hansen@9elements.com> | Thu Apr 10 14:25:53 2025 +0200 |
| committer | Alexander Hansen <alexander.hansen@9elements.com> | Tue Jun 03 13:07:46 2025 +0200 |
| tree | 225e29a010c8ea44ce7ae98872b6a735bf5e427f | |
| parent | a62ebc9f023c81d1e82a00905e023dcf5b5e62c6 [diff] |
common: Add emit_added for Software Update intf
The 'InterfacesAdded' signal is needed for the object mapper to know of
the dbus interface.
```
root@s8030-bmc-30303035c0c1:~# busctl tree xyz.openbmc_project.Software.BIOS
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/software
`- /xyz/openbmc_project/software/HostSPIFlash_5592
```
But the object mapper does not find the object path
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Update
as 2 "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/bios_active"
```
meanwhile it finds the version interface, since there we already emit
the signal.
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Version
as 7 "/xyz/openbmc_project/logging/entry/1" "/xyz/openbmc_project/logging/entry/2" "/xyz/openbmc_project/logging/entry/3" "/xyz/openbmc_project/logging/entry/4" "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/HostSPIFlash_5592" "/xyz/openbmc_project/software/bios_active"
```
Tested: Since the interface is emitted, object mapper now knows of the
object path.
```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias /xyz/openbmc_project 0 1 xyz.openbmc_project.Software.Update
as 3 "/xyz/openbmc_project/software/269f96b7" "/xyz/openbmc_project/software/HostSPIFlash_2523" "/xyz/openbmc_project/software/bios_active"
```
The software appears as updatable in the fw inventory.
```
curl --insecure --user root:root https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2523
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2523",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "HostSPIFlash_2523",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "Unknown"
}
```
Change-Id: Ibb7f9a5d122e991048b3513c6b9448e105173ca5
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson buildninja -C buildTo clean the repository run rm -r build.