Code Update: Add Redfish steps
Got asked about this. Added the steps to code update via Redfish. Added
a warning about using OpenBMC REST and TFTP.
Tested: Pushed to my fork. Looks okay.
Change-Id: Ia14dc81ac42f764b7f1ec5ee394b18716dc498d0
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/architecture/code-update/code-update.md b/architecture/code-update/code-update.md
index 789ee08..2070d74 100644
--- a/architecture/code-update/code-update.md
+++ b/architecture/code-update/code-update.md
@@ -36,13 +36,18 @@
2. Transfer the generated BMC image to the BMC via one of the following methods:
-- Method 1: Via scp: Copy the generated BMC image to the `/tmp/images/`
+- Method 1: Via Redfish Upload:
+ https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#firmware-update.
+ If using this method skip ahead to step 5!
+- Method 2: Via scp: Copy the generated BMC image to the `/tmp/images/`
directory on the BMC.
-- Method 2: Via REST Upload:
+- Method 3: Via REST Upload:
https://github.com/openbmc/docs/blob/master/rest-api.md#uploading-images
-- Method 3: Via TFTP: Perform a POST request to call the `DownloadViaTFTP`
+- Method 4: Via TFTP: Perform a POST request to call the `DownloadViaTFTP`
method of `/xyz/openbmc_project/software`.
+Methods 3 and 4 require additional options in bmcweb to be enabled.
+
3. Note the version id generated for that image file. The version id is a hash
value of 8 hexadecimal numbers, generated by SHA-512 hashing the version
string contained in the image and taking the first 8 characters. Get the
@@ -104,7 +109,14 @@
the activation progress and is not present once the activation is completed
via one of the following:
-- Method 1: From the BMC command line:
+- Method 1: From Redfish: A task is returned from the Redfish upload. The task
+ can be used to monitor the progress.
+
+ ```
+ curl -k https://${bmc}/redfish/v1/TaskService/Tasks/0
+ ```
+
+- Method 2: From the BMC command line:
```
busctl get-property xyz.openbmc_project.Software.BMC.Updater \
@@ -112,7 +124,7 @@
xyz.openbmc_project.Software.ActivationProgress Progress
```
-- Method 2: Using the REST API:
+- Method 3: Using the REST API:
```
curl -b cjar -k https://${bmc}/xyz/openbmc_project/software/<id>/attr/Progress
@@ -121,7 +133,13 @@
6. Check that the activation is complete by verifying the "Activation" property
is set to "Active" via one of the following methods:
-- Method 1: From the BMC command line:
+- Method 1: From Redfish: Check the task returned from the Redfish upload.
+
+ ```
+ curl -k https://${bmc}/redfish/v1/TaskService/Tasks/0
+ ```
+
+- Method 2: From the BMC command line:
```
busctl get-property xyz.openbmc_project.Software.BMC.Updater \
@@ -129,7 +147,7 @@
xyz.openbmc_project.Software.Activation Activation
```
-- Method 2: Using the REST API:
+- Method 3: Using the REST API:
```
curl -b cjar -k https://${bmc}/xyz/openbmc_project/software/<id>
@@ -137,13 +155,19 @@
7. Reboot the BMC for the image to take effect.
-- Method 1: From the BMC command line:
+- Method 1: From Redfish: If ApplyTime was set to "Immediate", the BMC will
+ automatically reboot:
+ https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#firmware-applytime.
+ To reboot the BMC manually see:
+ https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#bmc-reboot.
+
+- Method 2: From the BMC command line:
```
reboot
```
-- Method 2: Using the REST API:
+- Method 3: Using the REST API:
```
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT \