Skip to content

Commit 95bee4e

Browse files
committed
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>
1 parent 224266e commit 95bee4e

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

architecture/code-update/code-update.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ MachineName=tiogapass
3636

3737
2. Transfer the generated BMC image to the BMC via one of the following methods:
3838

39-
- Method 1: Via scp: Copy the generated BMC image to the `/tmp/images/`
39+
- Method 1: Via Redfish Upload:
40+
https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#firmware-update.
41+
If using this method skip ahead to step 5!
42+
- Method 2: Via scp: Copy the generated BMC image to the `/tmp/images/`
4043
directory on the BMC.
41-
- Method 2: Via REST Upload:
44+
- Method 3: Via REST Upload:
4245
https://github.com/openbmc/docs/blob/master/rest-api.md#uploading-images
43-
- Method 3: Via TFTP: Perform a POST request to call the `DownloadViaTFTP`
46+
- Method 4: Via TFTP: Perform a POST request to call the `DownloadViaTFTP`
4447
method of `/xyz/openbmc_project/software`.
4548

49+
Methods 3 and 4 require additional options in bmcweb to be enabled.
50+
4651
3. Note the version id generated for that image file. The version id is a hash
4752
value of 8 hexadecimal numbers, generated by SHA-512 hashing the version
4853
string contained in the image and taking the first 8 characters. Get the
@@ -104,15 +109,22 @@ MachineName=tiogapass
104109
the activation progress and is not present once the activation is completed
105110
via one of the following:
106111

107-
- Method 1: From the BMC command line:
112+
- Method 1: From Redfish: A task is returned from the Redfish upload. The task
113+
can be used to monitor the progress.
114+
115+
```
116+
curl -k https://${bmc}/redfish/v1/TaskService/Tasks/0
117+
```
118+
119+
- Method 2: From the BMC command line:
108120

109121
```
110122
busctl get-property xyz.openbmc_project.Software.BMC.Updater \
111123
/xyz/openbmc_project/software/<id> \
112124
xyz.openbmc_project.Software.ActivationProgress Progress
113125
```
114126

115-
- Method 2: Using the REST API:
127+
- Method 3: Using the REST API:
116128

117129
```
118130
curl -b cjar -k https://${bmc}/xyz/openbmc_project/software/<id>/attr/Progress
@@ -121,29 +133,41 @@ MachineName=tiogapass
121133
6. Check that the activation is complete by verifying the "Activation" property
122134
is set to "Active" via one of the following methods:
123135

124-
- Method 1: From the BMC command line:
136+
- Method 1: From Redfish: Check the task returned from the Redfish upload.
137+
138+
```
139+
curl -k https://${bmc}/redfish/v1/TaskService/Tasks/0
140+
```
141+
142+
- Method 2: From the BMC command line:
125143

126144
```
127145
busctl get-property xyz.openbmc_project.Software.BMC.Updater \
128146
/xyz/openbmc_project/software/<id> \
129147
xyz.openbmc_project.Software.Activation Activation
130148
```
131149

132-
- Method 2: Using the REST API:
150+
- Method 3: Using the REST API:
133151

134152
```
135153
curl -b cjar -k https://${bmc}/xyz/openbmc_project/software/<id>
136154
```
137155

138156
7. Reboot the BMC for the image to take effect.
139157

140-
- Method 1: From the BMC command line:
158+
- Method 1: From Redfish: If ApplyTime was set to "Immediate", the BMC will
159+
automatically reboot:
160+
https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#firmware-applytime.
161+
To reboot the BMC manually see:
162+
https://github.com/openbmc/docs/blob/master/REDFISH-cheatsheet.md#bmc-reboot.
163+
164+
- Method 2: From the BMC command line:
141165

142166
```
143167
reboot
144168
```
145169

146-
- Method 2: Using the REST API:
170+
- Method 3: Using the REST API:
147171

148172
```
149173
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT \

0 commit comments

Comments
 (0)