diff options
| author | Adriana Kobylak <anoo@us.ibm.com> | 2017-08-03 10:42:44 -0500 |
|---|---|---|
| committer | Adriana Kobylak <anoo@us.ibm.com> | 2017-09-20 13:18:00 -0500 |
| commit | a33c90e81c3af3488e64dcaff1619b7da86bb3d4 (patch) | |
| tree | 52909fd2cd1d083bc7b898f266e20996aab06f40 | |
| parent | a441832a323e9a0be58d689176e77aded671835a (diff) | |
| download | openbmc-docs-a33c90e81c3af3488e64dcaff1619b7da86bb3d4.tar.gz openbmc-docs-a33c90e81c3af3488e64dcaff1619b7da86bb3d4.zip | |
code-update.md: Add non-REST instructions to the Host Update
Add details on how to perform a host code update without using
the REST interfaces, by manually copying the image file to the
BMC and performing the activation from the BMC command line.
Also describe what a version id is, and how to check the
activation is completed.
Change-Id: I60f97f3a6430f7f93c388aff51d96a3f3a440217
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
| -rw-r--r-- | code-update.md | 121 |
1 files changed, 99 insertions, 22 deletions
diff --git a/code-update.md b/code-update.md index 940c7e8..5b8c772 100644 --- a/code-update.md +++ b/code-update.md @@ -198,33 +198,110 @@ https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_proj Following are the steps to update the host firmware (or "BIOS"). This assumes the host is not accessing its firmware. -Get a squashfs image: +1. Get a squashfs image: * Build op-build: https://github.com/open-power/op-build * After building, the image should be a tarball in the output/images directory called <system type>.pnor.squashfs.tar -Transfer the generated squashfs image to the BMC via one of two methods: - * Via REST Upload: +2. Transfer the generated squashfs image to the BMC via one of the following +methods: + * Method 1: Via scp: Copy the generated squashfs image to the `/tmp/images/` + directory on the BMC. + * Method 2: Via REST Upload: https://github.com/openbmc/docs/blob/master/rest-api.md#uploading-images - * Via TFTP: Perform a POST request to call the `DownloadViaTFTP` method of - `/xyz/openbmc_project/software`. - - - curl -b cjar -k -H "Content-Type: application/json" -X POST \ - -d '{"data": ["<filename>", "<TFTP server IP address"]}' \ - https://bmc/xyz/openbmc_project/software/action/DownloadViaTFTP - -To initiate the update, set the `RequestedActivation` property of the desired -image to `Active`. - - curl -b cjar -k -H "Content-Type: application/json" -X PUT \ - -d '{"data": - "xyz.openbmc_project.Software.Activation.RequestedActivations.Active"}' \ - https://bmc/xyz/openbmc_project/software/<id>/attr/RequestedActivation - -Check the flash progress: - - curl -b cjar -k https://bmc/xyz/openbmc_project/software/<id>/attr/Progress + * Method 3: Via TFTP: Perform a POST request to call the `DownloadViaTFTP` + method of `/xyz/openbmc_project/software`. + + ``` + curl -b cjar -k -H "Content-Type: application/json" -X POST \ + -d '{"data": ["<filename>", "<TFTP server IP address"]}' \ + https://bmc/xyz/openbmc_project/software/action/DownloadViaTFTP + ``` + +3. Note the version id generated for that image file, which is a hash value of 8 +hexadecimal numbers generated by the C++ function std::hash using the version +string contained in the image (TODO: the hash algorithm may change to allow users +to calculate it externally openbmc/openbmc#2274) via one of the following methods: + + * Method 1: From the BMC command line, note the most recent directory name + created under `/tmp/images/`, in this example it'd be `2a1022fe`: + + ``` + # ls -l /tmp/images/ + total 0 + drwx------ 2 root root 80 Aug 22 07:54 2a1022fe + drwx------ 2 root root 80 Aug 22 07:53 488449a2 + ``` + + * Method 2: Using the REST API, note the object that has its Activation + property set to Ready, in this example it'd be `2a1022fe`: + + ``` + $ curl -b cjar -k https://bmc/xyz/openbmc_project/software/enumerate + { + "data": { + "/xyz/openbmc_project/software/2a1022fe": { + "Activation": "xyz.openbmc_project.Software.Activation.Activations.Ready", + ``` + +4. To initiate the update, set the `RequestedActivation` property of the desired +image to `Active`, substitute ``<id>`` with the hash value noted on the previous +step, this will write the contents of the image to a UBI volume in the PNOR chip +via one of the following methods: + + * Method 1: From the BMC command line: + + ``` + busctl set-property org.open_power.Software.Host.Updater \ + /xyz/openbmc_project/software/<id> \ + xyz.openbmc_project.Software.Activation RequestedActivation s \ + xyz.openbmc_project.Software.Activation.RequestedActivations.Active + + ``` + + * Method 2: Using the REST API: + + ``` + curl -b cjar -k -H "Content-Type: application/json" -X PUT \ + -d '{"data": + "xyz.openbmc_project.Software.Activation.RequestedActivations.Active"}' \ + https://bmc/xyz/openbmc_project/software/<id>/attr/RequestedActivation + ``` + +5. (Optional) Check the flash progress. This interface is only available during +the activation progress and is not present once the activation is completed +via one of the following: + + * Method 1: From the BMC command line: + + ``` + busctl get-property org.open_power.Software.Host.Updater \ + /xyz/openbmc_project/software/<id> \ + xyz.openbmc_project.Software.Activation Progress + ``` + + * Method 2: Using the REST API: + + ``` + curl -b cjar -k https://bmc/xyz/openbmc_project/software/<id>/attr/Progress + ``` + +6. Check 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: + + ``` + busctl get-property org.open_power.Software.Host.Updater \ + /xyz/openbmc_project/software/<id> \ + xyz.openbmc_project.Software.Activation Activation + ``` + + * Method 2: Using the REST API: + + ``` + curl -b cjar -k https://bmc/xyz/openbmc_project/software/<id> + ``` ### Patching the host firmware |

