8. Firmware operations
This section describes how to conduct firmware operations using the CLI, REST and Redfish interfaces.
The latest version of the firmware is included in the IPU-Machine software release. You can download this from the Graphcore software download portal:
The version of the firmware is listed in the file manifest.json
.
You can check the currently installed version of the BMC firmware with the following command, when logged in to the BMC via SSH or the serial console.:
$ cat /etc/os-release
8.1. REST API
You can do
firmware operations through the REST interface either by sending curl
queries to the URI or by using the Graphcore openbmctool.py
utility.
Table 8.1 describes the commands available.
Command |
Description |
|
---|---|---|
|
Show the ID of the current functional firmware |
|
$ curl -k https://<bmcip>/xyz/openbmc_project/software/functional -u <bmcuser>:<bmcpass>
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> firmware list
|
||
|
Generate a JSON formatted list of firmware IDs and their properties. |
|
$ curl -k https://<bmcip>/xyz/openbmc_project/software/enumerate -u <bmcuser>:<bmcpass>
|
||
|
Activate the firmware with the specified ID. The activation will take place after next reboot. |
|
$ curl -k -H "Content-Type: application/json" -X PUT https://<bmcip>/xyz/openbmc_project/software/<image_id>/attr/Priority -d '{"data": 0}' u <bmcuser>:<bmcpass>
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> firmware activate <image_id>
|
||
|
Delete firmware with the specified ID from system. |
|
$ curl -k -H "Content-Type: application/json" -X POST -d '{"data": []}' https://<bmcip>/xyz/openbmc_project/software/<image_id>/action/Delete -u <bmcuser>:<bmcpass>
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> firmware delete <image_id>
|
||
|
Flash & activate a new firmware image |
|
$ python3 openbmctool.py -H <bmcip> -U <bmcuser> -P <bmcpass> firmware flash bmc -f <image_loc>
|
8.2. IPMI
Firmware operations are not available via IPMI.
8.3. Redfish
You can do
firmware operations through Redfish by either by sending curl
queries or browsing the URI.
You can find firmware information and operations in the UpdateService collection available at https://<bmcip>/redfish/v1/UpdateService
.
All Redfish endpoints can be traversed in a top-down fashion.
Table 8.2 describes the commands available.
Command |
Description |
---|---|
Firmware list |
List firmware available on the system. |
$ curl -k https://<bmcip>/redfish/v1/UpdateService/FirmwareInventory -u <bmcuser>:<bmcpass>
|
|
Firmware enumerate |
Get detailed information about a firmware image |
$ curl -k https://<bmcip>/redfish/v1/UpdateService/FirmwareInventory/<fw_image> -u <bmcuser>:<bmcpass>
|
An example of using Redfish to view detailed information about the firmware image “fd6e887a” is shown below:
$ curl -k https://<bmcip>/redfish/v1/UpdateService/FirmwareInventory/fd6e887a -u <bmcuser>:<bmcpass>
{
"@odata.context": "/redfish/v1/$metadata#SoftwareInventory.SoftwareInventory",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/fd6e887a",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC update",
"Id": "fd6e887a",
"[email protected]": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "2.7.0-1439-gb1b05fe86"
}