| e634411b | 26-Nov-2025 |
Henry Wu <Henry_Wu@quantatw.com> |
common: add GPIO controller function
The CPLD update process requires toggling a GPIO pin to control the debug card mux. BIOS and EEPROM updates use the same logic, so refactor the duplicated code i
common: add GPIO controller function
The CPLD update process requires toggling a GPIO pin to control the debug card mux. BIOS and EEPROM updates use the same logic, so refactor the duplicated code into a common GPIO controller function. Update BIOS, EEPROM, and CPLD code paths to use the new helper.
Tested: - Verified CPLD update with GPIO mux toggling - Verified BIOS update with GPIO mux toggling
Verified CPLD update with GPIO mux toggling ``` Dec 18 18:33:35 bmc phosphor-cpld-software-update[1064]: Requesting chip gpiochip0, GPIO line debug-card-mux to 1 Dec 18 18:33:35 bmc phosphor-cpld-software-update[1064]: Updating Lattice CPLD firmware Dec 18 18:33:45 bmc phosphor-cpld-software-update[1064]: [48K blob data] Dec 18 18:34:14 bmc phosphor-cpld-software-update[1064]: [48K blob data] Dec 18 18:34:31 bmc phosphor-cpld-software-update[1064]: Successfully updated CPLD Dec 18 18:34:31 bmc phosphor-cpld-software-update[1064]: Requesting chip gpiochip0, GPIO line debug-card-mux to 0 ```
Verified BIOS update with GPIO mux toggling ``` Dec 18 18:45:53 bmc phosphor-bios-software-update[1063]: Requesting chip gpiochip0, GPIO line FM_MUX1_SEL_R to 1 Dec 18 18:46:24 bmc phosphor-bios-software-update[2158]: [14.8K blob data] Dec 18 18:46:30 bmc phosphor-bios-software-update[2158]: [47.9K blob data] Dec 18 18:46:37 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:46:44 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:46:51 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:46:58 bmc phosphor-bios-software-update[2158]: [47.9K blob data] Dec 18 18:46:58 bmc phosphor-bios-software-update[2158]: [4.5K blob data] Dec 18 18:47:01 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:47:04 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:47:07 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:47:10 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:47:13 bmc phosphor-bios-software-update[2158]: [48K blob data] Dec 18 18:47:15 bmc phosphor-bios-software-update[2158]: [20.5K blob data] Dec 18 18:47:17 bmc phosphor-bios-software-update[1063]: Successfully updated SPI flash Dec 18 18:47:17 bmc phosphor-bios-software-update[1063]: Requesting chip gpiochip0, GPIO line FM_MUX1_SEL_R to 0 ```
Change-Id: I8d3c128951fd833a0cd25e1440236f82d37b776f Signed-off-by: Henry Wu <Henry_Wu@quantatw.com>
show more ...
|
| e1d2fa84 | 04-Dec-2025 |
Haiyue Wang <haiyuewa@163.com> |
common: i2c: Fix 'close()' may close invalid fd
If 'I2C_SLAVE_FORCE' fails, the "close()" will be called twice by the "open()" and "~I2C()", and the "close()" doesn't check the 'fd' value valid or n
common: i2c: Fix 'close()' may close invalid fd
If 'I2C_SLAVE_FORCE' fails, the "close()" will be called twice by the "open()" and "~I2C()", and the "close()" doesn't check the 'fd' value valid or not.
And "close()" should not be a valid const member function, chang it to mark the 'fd' invalid if "::close()" is called.
Change-Id: Ibeb923c4e3ea400c2de630ff7223df56c349a941 Signed-off-by: Haiyue Wang <haiyuewa@163.com>
show more ...
|
| 782d6eed | 19-Aug-2025 |
FreddieJheng <Freddie.Jheng@quantatw.com> |
i2c-vr: add support for MPS MP5998 VR firmware update over I2C
This commit introduces support for programming MPS MP5998 VR devices over the I2C bus. Support for the MP5998Firmware type in entity-ma
i2c-vr: add support for MPS MP5998 VR firmware update over I2C
This commit introduces support for programming MPS MP5998 VR devices over the I2C bus. Support for the MP5998Firmware type in entity-manager was added in [1].
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/83114
Tested on the Santabarbara platform:
1. Display the fw inventory ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692" }, {...} ], "Members@odata.count": 13, "Name": "Software Inventory Collection" } ```
2. Query version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_PDB2_VR_MP5998_8692", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "508F" } ```
3. Trigger the fw update via redfish. ``` curl -k ${creds} \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{"Targets":["/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"],"@Redfish.OperationApplyTime":"OnReset"};type=application/json" \ -F "UpdateFile=@${fwpath};type=application/octet-stream" \ https://${bmc}/redfish/v1/UpdateService/update-multipart ```
4. Task is returned ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 0, "StartTime": "2025-08-22T08:41:47+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Running", "TaskStatus": "OK" } ```
5. Query Task status ``` curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0 ```
``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-08-22T08:41:48+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 80 percent complete.", "MessageArgs": [ "0", "80" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 100, "StartTime": "2025-08-22T08:41:47+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
6. Display the fw inventory with newly updated fw. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692" }, {...} ], "Members@odata.count": 16, "Name": "Software Inventory Collection" } ```
7. Query the new fw version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_PDB2_VR_MP5998_5612", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "FCFF" } ```
8. Do AC cycle to make sure the new fw is applied. ``` busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \ xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle ```
9. Display the fw inventory after AC cycle. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302" }, {...} ], "Members@odata.count": 12, "Name": "Software Inventory Collection" } ```
10. Query the fw version after AC cycle. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_PDB2_VR_MP5998_302", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "FCFF" } ```
Change-Id: Ia973a142ac04e041989a74a87e7f1fd8bd16ae3d Signed-off-by: Freddie Jheng <Freddie.Jheng@quantatw.com>
show more ...
|
| e2cd6759 | 15-Aug-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: Add getBusName function
Add this function as 'protected' to be able to call it from test code.
The alternative would be to reconstruct the bus name in test code based on the unique suffix,
common: Add getBusName function
Add this function as 'protected' to be able to call it from test code.
The alternative would be to reconstruct the bus name in test code based on the unique suffix, duplicating the code.
Tested: Inspection only.
Change-Id: Iafed55b5869850f8e1d547e580bdaffd5cfbb6eb Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 3f2f3e6a | 15-Aug-2025 |
Kevin Tung <Kevin.Tung@quantatw.com> |
i2c-vr: add support for MPS MP297X VR firmware update over I2C
This commit introduces support for programming MPS MP297X VR devices over the I2C bus. It enables firmware updates for VR models such a
i2c-vr: add support for MPS MP297X VR firmware update over I2C
This commit introduces support for programming MPS MP297X VR devices over the I2C bus. It enables firmware updates for VR models such as MP2971 and MP2973. Support for the MP297XFirmware type in EM was added in [1].
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82949
Tested on the Santabarbara platform:
1. Display the fw inventory ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614" }, {...} ], "Members@odata.count": 15, "Name": "Software Inventory Collection" } ```
2. Query version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_PEX0_8614", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "30EA058B" } ```
3. Trigger the fw update via redfish. ``` curl -k ${creds} \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" \ -F "UpdateFile=@${fwpath};type=application/octet-stream" \ https://${bmc}/redfish/v1/UpdateService/update-multipart ```
4. Task is returned ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/1", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "1", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has started.", "MessageArgs": [ "1" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 1", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 0, "StartTime": "2025-08-20T01:51:20+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1", "TaskState": "Running", "TaskStatus": "OK" } ```
5. Query Task status ``` curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/1 ```
``` { "@odata.id": "/redfish/v1/TaskService/Tasks/1", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-08-20T01:51:24+00:00", "HidePayload": false, "Id": "1", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has started.", "MessageArgs": [ "1" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has changed to progress 50 percent complete.", "MessageArgs": [ "1", "50" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has changed to progress 80 percent complete.", "MessageArgs": [ "1", "80" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has changed to progress 100 percent complete.", "MessageArgs": [ "1", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '1' has completed.", "MessageArgs": [ "1" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 1", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 100, "StartTime": "2025-08-20T01:51:20+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1", "TaskState": "Completed", "TaskStatus": "OK" } ```
6. Display the fw inventory with newly updated fw. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_8614" }, {...} ], "Members@odata.count": 16, "Name": "Software Inventory Collection" } ```
7. Query the new fw version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_272", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_PEX0_272", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "E68829FD" } ```
8. Do AC cycle to make sure the new fw is applied. ``` busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \ xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle ```
9. Display the fw inventory after AC cycle. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790" }, {...} ], "Members@odata.count": 15, "Name": "Software Inventory Collection" } ```
10. Query the fw version after AC cycle. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_PEX0_3790", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_PEX0_3790", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "E68829FD" } ```
Change-Id: I0162bf6335ec673dd8c2a1cfb358c4c2a010570e Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
show more ...
|
| dcf4b607 | 04-Jul-2025 |
Kevin Tung <Kevin.Tung@quantatw.com> |
i2c-vr: add support for MPS MP2X6XX VR firmware update over I2C
This commit introduces support for programming MPS MP2X6XX VR devices over the I2C bus. It enables firmware updates for VR models such
i2c-vr: add support for MPS MP2X6XX VR firmware update over I2C
This commit introduces support for programming MPS MP2X6XX VR devices over the I2C bus. It enables firmware updates for VR models such as MP2869(A), MP29612(A), and MP29608(A). Support for the MP2X6XXFirmware type in EM was added in [1].
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82575
Tested on the Santabarbara platform:
1. Display the fw inventory ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228" }, {...} ], "Members@odata.count": 13, "Name": "Software Inventory Collection" } ```
2. Query version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_CPU1_4228", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": true, "Version": "1F88" } ```
3. Trigger the fw update via redfish. ``` curl -k ${creds} \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" \ -F "UpdateFile=@${fwpath};type=application/octet-stream" \ https://${bmc}/redfish/v1/UpdateService/update-multipart ```
4. Task is returned ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 0, "StartTime": "2025-07-29T08:51:41+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Running", "TaskStatus": "OK" } ```
5. Query Task status ``` curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0 ```
``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-07-29T08:51:46+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 20 percent complete.", "MessageArgs": [ "0", "20" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 50 percent complete.", "MessageArgs": [ "0", "50" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 80 percent complete.", "MessageArgs": [ "0", "80" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 100, "StartTime": "2025-07-29T08:51:41+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
6. Display the fw inventory with newly updated fw. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_4228" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453" }, {...} ], "Members@odata.count": 14, "Name": "Software Inventory Collection" } ```
7. Query the new fw version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_5453", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_CPU1_5453", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "42C3" } ```
8. Do AC cycle to make sure the new fw is applied. ``` busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \ xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle ```
9. Display the fw inventory after AC cycle. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249" }, {...} ], "Members@odata.count": 13, "Name": "Software Inventory Collection" } ```
10. Query the fw version after AC cycle. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_MB_VR_CPU1_2249", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Santabarbara_MB_VR_CPU1_2249", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": true, "Version": "42C3" } ```
Change-Id: Ifa6fdd79f5d087adb6037e0043897fa6199ae097 Signed-off-by: Kevin Tung <Kevin.Tung@quantatw.com>
show more ...
|
| c538727d | 28-Jul-2025 |
Kevin Tung <kevin.tung@quantatw.com> |
TPM code updater
This commit introduces a TPM code updater that currently supports reading the firmware version for both Infineon and Nuvoton TPM 2.0. Support for firmware updates will be introduced
TPM code updater
This commit introduces a TPM code updater that currently supports reading the firmware version for both Infineon and Nuvoton TPM 2.0. Support for firmware updates will be introduced in a future patch.
The updater's configuration are managed by the EM [1]. [1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/82416
Tested on Yosemite5 with the following steps:
1. Display the fw inventory: ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ {...}, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945" }, {...} ], "Members@odata.count": 4, "Name": "Software Inventory Collection" } ```
2. Query TPM version: ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945 { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_TPM_4945", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "Yosemite5_TPM_4945", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": false, "Version": "15.23" } ```
Change-Id: I42568242356d55fe005ba1f41ddf8aaf9f682fc8 Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
show more ...
|
| 953fdc5c | 13-Aug-2025 |
Kevin Tung <kevin.tung@quantatw.com> |
common: trim null bytes from filename in readNotifyAsync()
readNotifyAsync() uses inotify_event to monitor filesystem changes. The name field in inotify_event contains a null-terminated name, and ma
common: trim null bytes from filename in readNotifyAsync()
readNotifyAsync() uses inotify_event to monitor filesystem changes. The name field in inotify_event contains a null-terminated name, and may include additional null bytes to pad the structure for alignment as mentioned in [1] inotify(7).
If the padded name (including extra null bytes) is passed directly to processUpdate(), the comparison against the expected filename will fail, even when the visible parts of the names match.
This change ensures the filename is trimmed at the first null byte before being passed to processUpdate(), preventing false mismatches and ensuring correct processing.
Tested on Yosemite5, and confirmed that the BIOS version is retrieved correctly when host0_bios_version.txt is created.
[1] https://www.man7.org/linux/man-pages/man7/inotify.7.html
Change-Id: Ic0ccd7f4e163eb650baa65045c9af1e7be01964b Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
show more ...
|
| dbb7015e | 07-Aug-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: make Software::objectPath const
Software::objectPath is initialized in the constructor and should not be modified later on.
Can also be protected instead of public.
Tested: Inspection only
common: make Software::objectPath const
Software::objectPath is initialized in the constructor and should not be modified later on.
Can also be protected instead of public.
Tested: Inspection only.
Change-Id: I9404fc46b6d039d7a7e96ebb232e34ee0aa978e8 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 53c7c0e5 | 29-Jul-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: split inventory association function
Create Software::createInventoryAssociation to split the object mapper call from actually creating the association.
This makes unit testing the function
common: split inventory association function
Create Software::createInventoryAssociation to split the object mapper call from actually creating the association.
This makes unit testing the functions easier and provides a clean separation between the logic provided by common code versus the external information we are fetching.
Tested: Inspection only.
Change-Id: I0147480219b9c9fbc709699b9e50411fb11bea6e Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| b0cfda6f | 18-Jul-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: fix Software::getPurpose error path
'version' cannot be dereferenced if it is not initialized.
Change the API to return an std::optional and handle in the caller.
Change-Id: Iac7badf145dad
common: fix Software::getPurpose error path
'version' cannot be dereferenced if it is not initialized.
Change the API to return an std::optional and handle in the caller.
Change-Id: Iac7badf145dad64e21ede5e81f0b4b761ff6c89d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| a2eb951f | 05-May-2025 |
Kevin Tung <Kevin.Tung@quantatw.com> |
common: move asyncSystem() to common
asyncSystem() is shared across updaters, so moved to common.
Change-Id: I3545d34ecc1f1bf8a226d020267ae00bcf42c5f9 Signed-off-by: Kevin Tung <Kevin.Tung@quantatw
common: move asyncSystem() to common
asyncSystem() is shared across updaters, so moved to common.
Change-Id: I3545d34ecc1f1bf8a226d020267ae00bcf42c5f9 Signed-off-by: Kevin Tung <Kevin.Tung@quantatw.com>
show more ...
|
| 37a30143 | 12-Jun-2025 |
Daniel Hsu <Daniel-Hsu@quantatw.com> |
common: i2c: Add non-coroutine sendReceive()
This commit introduces a non-coroutine version of `sendReceive()` in the common I2C module. The new implementation avoids potential stack buffer issues b
common: i2c: Add non-coroutine sendReceive()
This commit introduces a non-coroutine version of `sendReceive()` in the common I2C module. The new implementation avoids potential stack buffer issues by ensuring synchronous execution.
Change-Id: I1d308f24fafa6e0d68ffcc67073e0a2e67a6b419 Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
show more ...
|
| df628196 | 18-Jun-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: use aserver property constructor
Since PDI gen code now [1] supports constructing DBus interfaces with property values, simplify the common code to use that API.
Tested: Unit Tests Pass
Re
common: use aserver property constructor
Since PDI gen code now [1] supports constructing DBus interfaces with property values, simplify the common code to use that API.
Tested: Unit Tests Pass
References: [1] https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/78790
Change-Id: Ic29531b391f8609377105dbcbac2e8a55b29746c Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 8b4ab1e4 | 10-Apr-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
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.openbm
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>
show more ...
|
| cec14752 | 08-May-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: handle match for config intf added/removed
When the configuration interface for any device is added or removed as part of dynamic configuration (via EM) the software manager has to handle th
common: handle match for config intf added/removed
When the configuration interface for any device is added or removed as part of dynamic configuration (via EM) the software manager has to handle the dbus match and add or remove devices as necessary.
When an update is in progress, the device is not removed, even if the configuration was removed.
Tested: On Tyan S8030 with bios software updater
For testing add/remove of configuration interfaces, the configuration was probed on the powersupply FRU.
In case of InterfacesAdded:
``` May 26 14:54:00 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: [config] found configuration interface at xyz.openbmc_project.EntityManager, /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Missing property Name on path /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash, interface xyz.openbmc_project.Configuration.SPIFlash.MuxOutputs1 May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Missing property Polarity on path /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash, interface xyz.openbmc_project.Configuration.SPIFlash.MuxOutputs1 May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: SPI device: 1:0 May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Found SPI Address 1e630000.spi May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: SPI Device HostSPIFlash at 1:0 initialized successfully May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: HostSPIFlash_5930: created dbus interfaces on path /xyz/openbmc_project/software/HostSPIFlash_5930 May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: [Software] enabling update of /xyz/openbmc_project/software/HostSPIFlash_5930 (adding the update interface) ```
``` busctl tree xyz.openbmc_project.Software.BIOS `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/software `- /xyz/openbmc_project/software/HostSPIFlash_5930 ```
In case of InterfacesRemoved:
``` May 26 14:58:23 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: detected interface xyz.openbmc_project.Configuration.SPIFlash removed on /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash May 26 14:58:23 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: removing device at /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash ```
``` busctl tree xyz.openbmc_project.Software.BIOS `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/software ```
Change-Id: I4faeb8e0144408b57767783ba2c5c4f3561f4021 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 90174799 | 08-May-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: extract handleInterfaceAdded
The function is extracted from initDevices to decouple it from iterating over the object mapper response.
Code is only moved and not changed.
Tested: Unit Test
common: extract handleInterfaceAdded
The function is extracted from initDevices to decouple it from iterating over the object mapper response.
Code is only moved and not changed.
Tested: Unit Tests Pass
Change-Id: I5d776818ca1bd7fb335bc540b07ff12993c1125e Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 7e446a40 | 22-Oct-2024 |
Christopher Meis <christopher.meis@9elements.com> |
Add i2c voltage regulator updater
- /i2c-vr: Classes following the design in [1] - /i2c-vr/vr.cpp, vr.hpp: General representation of a voltage regulators communication interface - /vr-i2c/xdpe1x2x
Add i2c voltage regulator updater
- /i2c-vr: Classes following the design in [1] - /i2c-vr/vr.cpp, vr.hpp: General representation of a voltage regulators communication interface - /vr-i2c/xdpe1x2xx: Support for Infineon XDPE1x2xx class of voltage regulators - /common/i2c/: Basic I2C communication interface
The configuration of a voltage regulator relies on the EM-Schema in [2]
1: https://github.com/openbmc/docs/blob/master/designs/code-update.md 2: https://gerrit.openbmc.org/c/openbmc/entity-manager/+/77463
Tested on QEMU/Yosemite4:
1. Display the firmware inventory ``` curl --insecure --user root:0penBmc \ https://127.0.0.1:2443/redfish/v1/UpdateService/FirmwareInventory ```
Output: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/16bae6fd" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/DummyDeviceFirmwareName_6637" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Management_Board_cpld" }, {...} ```
2. Query voltage regulator version
The dummy device sets the default version to 0xBEEF (Decimal: 48879) ``` curl --insecure --user root:0penBmc \ https://127.0.0.1:2443/redfish/v1/UpdateService/FirmwareInventory/ DummyDeviceFirmwareName_4390 ```
Output: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/DummyDeviceFirmwareName_4390", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "DummyDeviceFirmwareName_4390", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": false, "Version": "48879" } ```
3. Trigger the update ``` curl -k --insecure --user root:0penBmc \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/DummyDeviceFirmwareName_4390\"],\"@Redfish.OperationApplyTime\":\"Immediate\"};type=application/json" \ -F "UpdateFile=@fw_vr_update.bin;type=application/octet-stream" \ https://127.0.0.1:2443/redfish/v1/UpdateService/update ```
4. Task is returned ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" } ``` 5. Query the task ``` curl --insecure --user root:0penBmc \ https://127.0.0.1:2443/redfish/v1/TaskService/Tasks/0 ```
Output: ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-03-10T13:47:34+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update" }, "PercentComplete": 0, "StartTime": "2025-03-10T13:47:34+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
6. Display fw inventory after update ``` curl --insecure --user root:0penBmc \ https://127.0.0.1:2443/redfish/v1/UpdateService/FirmwareInventory ```
Output: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/16bae6fd" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/DummyDeviceFirmwareName_282" }, {...} } ```
7. Query the new fw version.
The version is 'mycompversion' since that's what has been set in the pldm fw update package for testing.
``` curl --insecure --user root:0penBmc \ https://127.0.0.1:2443/redfish/v1/UpdateService/FirmwareInventory/ DummyDeviceFirmwareName_282 ```
Output: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/DummyDeviceFirmwareName_282", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "DummyDeviceFirmwareName_282", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "mycompversion" } ```
8. Update in progress error
``` curl -k --insecure --user root:0penBmc \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/${TARGET}\"],\"@Redfish.OperationApplyTime\":\"Immediate\"};type=application/json" \ -F "UpdateFile=@${FWPATH};type=application/octet-stream" \ https://127.0.0.1:2443/redfish/v1/UpdateService/update ```
Output: ``` { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.19.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.19.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } ```
Change-Id: I2e11a6c10ae40ed7719ceb86dfd6a38dd5b27017 Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
show more ...
|
| f2c95a08 | 26-Nov-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
SPI device code updater
This code updater is for updating spi flash devices. It can for example update the host firmware on different server boards and has following features:
- power down the host
SPI device code updater
This code updater is for updating spi flash devices. It can for example update the host firmware on different server boards and has following features:
- power down the host before update - set mux gpios to access spi flash - (very limited) communication with ME (Management Engine) - use flashrom to utilize fw with IFD (Intel Flash Descriptor) - otherwise directly write to the flash chip.
The behavior of this code updater can be configured via EM.
Tested: on Tyan S8030 and Tyan S5549 Board. Steps below.
1. Display the fw inventory
``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/717f6f4d" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_4950" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" } ], "Members@odata.count": 3, "Name": "Software Inventory Collection" } ```
2. Query BIOS version. The version is "unknown" here since currently there is no interface enabled via which to query it.
``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_4950 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_4950", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_4950", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": true, "Version": "unknown" } ```
3. Trigger the fw update via redfish.
``` curl -k ${creds} \ -H "Content-Type:multipart/form-data" \ -X POST \ -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_6041\"],\"@Redfish.OperationApplyTime\":\"Immediate\"};type=application/json" \ -F "UpdateFile=@${fwpath};type=application/octet-stream" \ https://${bmc}/redfish/v1/UpdateService/update ```
4. Task is returned
``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" } ```
5. Query Task status ``` curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0 ```
``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-02-18T14:05:46+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 10 percent complete.", "MessageArgs": [ "0", "10" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 20 percent complete.", "MessageArgs": [ "0", "20" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 70 percent complete.", "MessageArgs": [ "0", "70" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update" }, "PercentComplete": 90, "StartTime": "2025-02-18T14:04:47+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
6. Display the fw inventory with newly updated fw. ``` curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/717f6f4d" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_8728" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" } ], "Members@odata.count": 3, "Name": "Software Inventory Collection" } ```
7. Query the new fw version.
The version is 'mycompversion' since that's what has been set in the pldm fw update package for testing.
``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_8728 ```
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_8728", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Unknown image", "Id": "HostSPIFlash_8728", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "mycompversion" } ```
Change-Id: I27803b7fded71af2364c2f55fad841a410603dec Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| de5e76fa | 20-Feb-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
fix object manager path and emit interfaces added
- move object manager to the correct path - setup the bus name in constructor - emit 'InterfacesAdded' signal for object manager to find our softw
fix object manager path and emit interfaces added
- move object manager to the correct path - setup the bus name in constructor - emit 'InterfacesAdded' signal for object manager to find our software version
Since properties can be uninitialized in the generated bindings, we have to initialize each property like version and version purpose.
Since object mapper relies on 'InterfacesAdded' signal, emit that signal such that our version is found in the firmware inventory.
Tested: on Tyan S8030 board with bios code updater
Using dbus-monitor, verify that the signal was emitted for initial version.
``` dbus-monitor --system "sender='xyz.openbmc_project.Software.BIOS',member='InterfacesAdded'"
signal time=1740740306.586571 sender=:1.266 -> destination=(null destination) serial=21 path=/xyz/openbmc_project/software; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded object path "/xyz/openbmc_project/software/HostSPIFlash_1520" array [ dict entry( string "xyz.openbmc_project.Software.Version" array [ dict entry( string "Version" variant string "v1.03" ) dict entry( string "Purpose" variant string "xyz.openbmc_project.Software.Version.VersionPurpose.Other" ) ] ) ] ```
Using object mapper, verify that it has picked up our initial version:
``` busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTree sias /xyz/openbmc_project/ 0 1 xyz.openbmc_project.Software.Version ```
Not showing output here since it gets verbose.
Checking the firmware inventory, the version also shows up: ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/5e6297dd" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_1520" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" } ], "Members@odata.count": 3, "Name": "Software Inventory Collection" } ```
Checking the specific entry: ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_1520 { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_1520", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "HostSPIFlash_1520", "Name": "Software Inventory", "Status": { "Health": "Warning", "HealthRollup": "OK", "State": "Disabled" }, "Updateable": false, "Version": "v1.03" } ```
Now, running an update:
``` curl -k --insecure --user root:root -H Content-Type:multipart/form-data -X POST -F 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_1520"],"@Redfish.OperationApplyTime":"Immediate"};type=application/json' -F 'UpdateFile=@pldm-package.bin;type=application/octet-stream' https://${bmc}/redfish/v1/UpdateService/update { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" } ```
Checking the task status: ``` curl --silent --insecure --user root:root https://${bmc}/redfish/v1/TaskService/Tasks/0 { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-02-28T11:10:55+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 10 percent complete.", "MessageArgs": [ "0", "10" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 20 percent complete.", "MessageArgs": [ "0", "20" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 70 percent complete.", "MessageArgs": [ "0", "70" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update" }, "PercentComplete": 100, "StartTime": "2025-02-28T11:10:28+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
Successfully applied this update and the firmware inventory is changed as expected
``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", "Members": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/5e6297dd" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/HostSPIFlash_1149" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/bios_active" } ], "Members@odata.count": 3, "Name": "Software Inventory Collection" } ```
Checking the object mapper, it is also aware of the new version.
Change-Id: If45158be3ae486e94ae2feb37ce8163b5f795054 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 1e833b44 | 04-Mar-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: host power utility
Create this utility class to abstract host power operation with a single function call.
This was refactored out of [1] (BIOS Code Updater)
Tested: Has been tested as par
common: host power utility
Create this utility class to abstract host power operation with a single function call.
This was refactored out of [1] (BIOS Code Updater)
Tested: Has been tested as part of [1]
References:
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/76101
Change-Id: I97dc8b1824f70f0aeede3b39683c2ee4ef9ca3c9 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 449e793c | 03-Mar-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: dbus helper for fetching configuration
Since currently the EM schemas and PDI interfaces for configuration parsing are not yet ready, we cannot use generated client bindings to fetch the con
common: dbus helper for fetching configuration
Since currently the EM schemas and PDI interfaces for configuration parsing are not yet ready, we cannot use generated client bindings to fetch the configuration.
Thus providing a helper function 'dbusGetRequiredProperty' for code updaters to fetch configuration. Call sites to this helper function should then later be replaced by using the generated client.
Change-Id: Icf3a34d58a8994a13f2a719ad13ca28a59cb77d0 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 5622ee92 | 18-Feb-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
common: activation progress not taking effect
'class Device' has member function
``` bool setUpdateProgress(uint8_t progress) const; ```
to update the activation status, which set the activation s
common: activation progress not taking effect
'class Device' has member function
``` bool setUpdateProgress(uint8_t progress) const; ```
to update the activation status, which set the activation status for device->softwarePending.
'softwarePending' however was only set on the class after the update to the device already succeeded. So 'Device::updateDevice' could not update the activation progress via 'Device::setUpdateProgress'
Fix this bug by setting 'softwarePending' before 'updateDevice' is called.
Tested: With SPI Device Code Updater.
The activation progress is now set as expected.
``` curl --silent --insecure --user root:root https://${bmc}/redfish/v1/TaskService/Tasks/0 ``` Output: ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-02-18T14:05:46+00:00", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 10 percent complete.", "MessageArgs": [ "0", "10" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 20 percent complete.", "MessageArgs": [ "0", "20" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 70 percent complete.", "MessageArgs": [ "0", "70" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has changed to progress 100 percent complete.", "MessageArgs": [ "0", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has completed.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update" }, "PercentComplete": 90, "StartTime": "2025-02-18T14:04:47+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
Change-Id: I4b22a37215357b83300f8368f75d3c025cd5d06b Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| cc372355 | 14-Jan-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
fw update: common code
new daemons to implement the flow as described in https://github.com/openbmc/docs/blob/master/designs/code-update.md
- common/ common code folder - common update flow -
fw update: common code
new daemons to implement the flow as described in https://github.com/openbmc/docs/blob/master/designs/code-update.md
- common/ common code folder - common update flow - base class for the device specific update daemons
The new daemons are all following the generic template of Code Updater daemon as outlined in the design.
The idea is that they are separate daemons (per device, as outlined in the design) but share all the code that's not device specific.
Tested: next patch in series
Change-Id: If2438b8506aceb8c5313ec13a0bf7cb68f3cc279 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|