commit | 0fdb61247161faacd9ef093fd6a9b7823eb364a7 | [log] [tgz] |
---|---|---|
author | Alexander Hansen <alexander.hansen@9elements.com> | Wed Jul 09 14:33:13 2025 +0200 |
committer | Alexander Hansen <alexander.hansen@9elements.com> | Tue Jul 29 14:36:20 2025 +0200 |
tree | e533827dc0dd1b22d58afbd1c8bb50093a09e2ee | |
parent | d9825681c72ef99f98371123f705fc3fdc86c913 [diff] |
common: fix: add emit_added calls Add these calls to make bmcweb and mapper aware of our DBus interfaces. Adding emit_added() should be safe to do since the interface already exists and the function is idempotent. Also set the activation status of the current software version to 'Active' after 'initDevice' returns. Tested: on Tyan S8030 Restarting BIOS sw manager without this patch yields ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_7868", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_7868", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": true, "Version": "Unknown" } ``` which is wrong since there is currently a sw version enabled. First testing update process without this patch ``` curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_7868"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-v4.01.bin;type=application/octet-stream' https://${bmc}/redfish/v1/UpdateService/update-multipart ``` yields ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_5637", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_5637", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "mycompversion" } ``` BIOS update process completes and bmcweb shows fw inventory as expected Starting the update process (with this patch): ``` curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_8460"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package-s8030-host-v4.01.bin;type=application/octet-stream' https://${bmc}/redfish/v1/UpdateService/update-multipart ``` Task returned from starting update process ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/2", "@odata.type": "#Task.v1_4_3.Task", "Id": "2", "TaskState": "Running", "TaskStatus": "OK" } ``` After update: ``` curl --insecure --user root:root https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_918 ``` ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_918", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_918", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "mycompversion" } ``` So we concluded that the fw inventory is correct even without the patch but on initial start of the BIOS sw manager the fw inventory is not correct. After restarting the BIOS sw manager with this patch: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_2291", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_2291", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "Unknown" } ``` Change-Id: I3aee245311b30e1ceba50d16598f940bb87626b0 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 build
ninja -C build
To clean the repository run rm -r build
.