summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-11-27 16:04:23 -0600
committerGunnar Mills <gmills@us.ibm.com>2017-12-12 18:57:02 -0600
commitc4c7f40553876aa19477530dc9e4dc97746defab (patch)
treea7ac6fc7d9f95a6314538e736a182726ecc23e00
parent6ba5cff02a0055e56a852982f31cdb183e4690c1 (diff)
downloadopenbmc-docs-c4c7f40553876aa19477530dc9e4dc97746defab.tar.gz
openbmc-docs-c4c7f40553876aa19477530dc9e4dc97746defab.zip
Moved host code update to own doc
UBI Code Update has its own document, so should Host Code Update. Moved the 3 code update documents to their own dir. Also, updated the titles, headers, and links to reflect this. Change-Id: I08199785f8ec3eee74375cdbf881ad6b8825a70c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--README.md2
-rw-r--r--code-update/code-update.md (renamed from code-update.md)146
-rw-r--r--code-update/host-code-update.md127
-rw-r--r--code-update/ubi-code-update.md (renamed from ubi-code-update.md)4
4 files changed, 145 insertions, 134 deletions
diff --git a/README.md b/README.md
index 6b5f8ec..99db1fa 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ interfaces to an OpenBMC system.
- [host-management.md](host-management.md): Performing host management tasks
with OpenBMC
- - [code-update.md](code-update.md): Updating OpenBMC and host platform firmware
+ - [code-update](code-update): Updating OpenBMC and host platform firmware
OpenBMC Development
diff --git a/code-update.md b/code-update/code-update.md
index 0976c42..dcef10c 100644
--- a/code-update.md
+++ b/code-update/code-update.md
@@ -1,6 +1,18 @@
-OpenBMC & Host Code Update
+OpenBMC non-UBI Code Update
===================
+Two BMC Code Updates layouts are available:
+
+ * Static, non-UBI layout - The default code update
+
+ * UBI layout - enabled via obmc-ubi-fs machine feature
+
+This document describes the non-UBI, default code update. The UBI code update
+can be found here: [ubi-code-update.md](ubi-code-update.md)
+
+The host code update can be found here:
+[host-code-update.md](host-code-update.md)
+
After building OpenBMC, you will end up with a set of image files in
`tmp/deploy/images/<platform>/`. The `image-*` symlinks correspond to components
that can be updated on the BMC:
@@ -177,10 +189,10 @@ flash:
-d '{"data": []}' \
https://${bmc}/org/openbmc/control/flash/bmc/action/Apply
-Now the image is being flashed, you can check the progress with above step’s command as well.
+Now the image is being flashed, you can check the progress with above step’s command as well.
* During flashing the image, the status becomes `Writing images to flash`
-* After it’s flashed and verified, the status becomes `Apply Complete. Reboot to take effect.`
+* After it's flashed and verified, the status becomes `Apply Complete. Reboot to take effect.`
### Reboot the BMC
@@ -191,131 +203,3 @@ of the BMC control object:
-d '{"data": []}' \
https://${bmc}/org/openbmc/control/bmc0/action/warmReset
-
-Host code update
-================
-
-Reference:
-https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Software
-
-Following are the steps to update the host firmware (or "BIOS"). This assumes
-the host is not accessing its firmware.
-
-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
-
-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
- * 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. 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
-version id 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: This method *only* works if there are no `Ready` images at the
- start of transferring the image. 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",
- ```
-
- * Method 3: Calculate the version id beforehand from the image with:
-
- ```
- tar xfO <squashfs image tar> MANIFEST | sed -ne '/version=/ {s/version=//;p}' | head -n1 | tr -d '\n' | sha512sum | cut -b 1-8
- ```
-
-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
-
-Copy the partition binary file to `/usr/local/share/pnor/` on the BMC.
-
-The partition binary file must be named the same as the partition name that
-intends to patch, ex: `ATTR_TMP`.
diff --git a/code-update/host-code-update.md b/code-update/host-code-update.md
new file mode 100644
index 0000000..e388de6
--- /dev/null
+++ b/code-update/host-code-update.md
@@ -0,0 +1,127 @@
+Host Code Update
+================
+
+Reference:
+https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Software
+
+Following are the steps to update the host firmware (or "BIOS"). This assumes
+the host is not accessing its firmware.
+
+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
+
+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
+ * 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. 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
+version id 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: This method *only* works if there are no `Ready` images at the
+ start of transferring the image. 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",
+ ```
+
+ * Method 3: Calculate the version id beforehand from the image with:
+
+ ```
+ tar xfO <squashfs image tar> MANIFEST | sed -ne '/version=/ {s/version=//;p}' | head -n1 | tr -d '\n' | sha512sum | cut -b 1-8
+ ```
+
+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
+
+Copy the partition binary file to `/usr/local/share/pnor/` on the BMC.
+
+The partition binary file must be named the same as the partition name that
+intends to patch, ex: `ATTR_TMP`.
diff --git a/ubi-code-update.md b/code-update/ubi-code-update.md
index d416668..80f6e41 100644
--- a/ubi-code-update.md
+++ b/code-update/ubi-code-update.md
@@ -1,4 +1,4 @@
-BMC UBI Code Update
+OpenBMC UBI Code Update
==============
Two BMC Code Updates layouts are available:
@@ -8,7 +8,7 @@ Two BMC Code Updates layouts are available:
* UBI layout - enabled via obmc-ubi-fs machine feature
This document describes the UBI code update. The non-UBI code update can be
-found here: https://github.com/openbmc/docs/blob/master/code-update.md#openbmc--host-code-update
+found here: [code-update.md](code-update.md)
### Steps to Update
OpenPOWER on IntegriCloud