1## Code Update ##
2
3#### Redfish Code Update ####
4
5Currently supported BMC and PNOR update formats are UBI.
6For code update information, please refer to [code-update.md](https://github.com/openbmc/docs/blob/master/code-update/code-update.md)
7
8* UBI Format
9
10    For BMC code update, download the system type *.ubi.mdt.tar image from
11    https://openpower.xyz/job/openbmc-build/ and run as follows:
12
13    For Witherspoon system:
14    ```
15    * Code Update with OnReset Policy
16
17        $ cd redfish/update_service/test_redfish_bmc_code_update.robot
18        $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/obmc-phosphor-image-witherspoon.ubi.mtd.tar --include Redfish_Code_Update_With_ApplyTime_OnReset redfish/update_service/test_redfish_bmc_code_update.robot
19
20    * Code Update with Immediate Policy
21
22        $ cd redfish/update_service/test_redfish_bmc_code_update.robot
23        $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/obmc-phosphor-image-witherspoon.ubi.mtd.tar --include Redfish_Code_Update_With_ApplyTime_Immediate redfish/update_service/test_redfish_bmc_code_update.robot
24    ```
25
26    For host code update, download the system type *.pnor.squashfs.tar image
27    from https://openpower.xyz/job/openpower-op-build/ and run as follows:
28
29    For Witherspoon system:
30    ```
31    * Code Update with OnReset Policy
32
33        $ cd redfish/update_service/test_redfish_host_code_update.robot
34        $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/witherspoon.pnor.squashfs.tar --include Redfish_Code_Update_With_ApplyTime_OnReset redfish/update_service/test_redfish_host_code_update.robot
35
36    * Code Update with Immediate Policy
37
38        $ cd redfish/update_service/test_redfish_host_code_update.robot
39        $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/witherspoon.pnor.squashfs.tar --include Redfish_Code_Update_With_ApplyTime_Immediate redfish/update_service/test_redfish_host_code_update.robot
40    ```
41
42#### REST Code Update ####
43
44Currently supported BMC and PNOR update formats are UBI and non-UBI.
45For code update information, please refer to [code-update.md](https://github.com/openbmc/docs/blob/master/code-update/code-update.md)
46
47
48* UBI Format
49
50    For BMC code update, download the system type *.ubi.mdt.tar image from
51    https://openpower.xyz/job/openbmc-build/ and run as follows:
52
53    For Witherspoon system:
54    ```
55    $ cd extended/code_update/
56    $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/obmc-phosphor-image-witherspoon.ubi.mtd.tar --include REST_BMC_Code_Update  bmc_code_update.robot
57    ```
58
59    For host code update, download the system type *.pnor.squashfs.tar image
60    from https://openpower.xyz/job/openpower-op-build/ and run as follows:
61
62    For Witherspoon system:
63    ```
64    $ cd extended/code_update/
65    $ robot -v OPENBMC_HOST:x.x.x.x -v IMAGE_FILE_PATH:<image path>/witherspoon.pnor.squashfs.tar --include REST_Host_Code_Update  host_code_update.robot
66    ```
67
68* Non-UBI Format
69
70    For BMC code update, download the system type *all.tar image from
71    https://openpower.xyz/job/openbmc-build/ and run as follows:
72
73    For a Zaius system:
74    ```
75    $ cd extended/code_update/
76    $ robot -v OPENBMC_HOST:x.x.x.x -v FILE_PATH:<image path>/zaius-<date time>.all.tar --include Initiate_Code_Update_BMC update_bmc.robot
77    ```
78
79    For host code update, download the system type *.pnor from
80    https://openpower.xyz/job/openpower-op-build/ and run as follows:
81
82    For a Zaius system:
83    ```
84    $ cd extended/
85    $ robot -v OPENBMC_HOST:x.x.x.x -v PNOR_IMAGE_PATH:<image path>/zaius.pnor test_bios_update.robot
86    ```
87