Skip to content

Commit 4422911

Browse files
authored
[fwutil]: Update command reference doc: per component FW update. (sonic-net#1708)
Signed-off-by: Nazarii Hnydyn <[email protected]> What I did Updated command reference to match fwutil v.2.0.0.0 How I did it Updated command reference
1 parent b83d2bf commit 4422911

File tree

1 file changed

+133
-57
lines changed

1 file changed

+133
-57
lines changed

doc/Command-Reference.md

+133-57
Original file line numberDiff line numberDiff line change
@@ -5889,22 +5889,86 @@ Go Back To [Beginning of the document](#) or [Beginning of this section](#pfc-wa
58895889
58905890
### Platform Component Firmware show commands
58915891
5892-
**show platform firmware**
5892+
**show platform firmware status**
58935893
58945894
This command displays platform components firmware status information.
58955895
58965896
- Usage:
58975897
```bash
5898-
show platform firmware
5898+
show platform firmware status
58995899
```
59005900

59015901
- Example:
59025902
```bash
5903-
admin@sonic:~$ show platform firmware
5903+
admin@sonic:~$ sudo show platform firmware status
59045904
Chassis Module Component Version Description
5905-
--------- -------- ----------- ----------------------- ---------------------------------------
5906-
Chassis1 N/A BIOS 0ACLH004_02.02.007_9600 BIOS - Basic Input/Output System
5907-
CPLD 5.3.3.1 CPLD - includes all CPLDs in the switch
5905+
--------- -------- ----------- ----------------------- ----------------------------------------
5906+
MSN3800 N/A ONIE 2020.11-5.2.0022-9600 ONIE - Open Network Install Environment
5907+
SSD 0202-000 SSD - Solid-State Drive
5908+
BIOS 0ACLH004_02.02.008_9600 BIOS - Basic Input/Output System
5909+
CPLD1 CPLD000120_REV0900 CPLD - Complex Programmable Logic Device
5910+
CPLD2 CPLD000165_REV0500 CPLD - Complex Programmable Logic Device
5911+
CPLD3 CPLD000166_REV0300 CPLD - Complex Programmable Logic Device
5912+
CPLD4 CPLD000167_REV0100 CPLD - Complex Programmable Logic Device
5913+
```
5914+
5915+
**show platform firmware updates**
5916+
5917+
This command displays platform components firmware updates information.
5918+
5919+
- Usage:
5920+
```bash
5921+
show platform firmware updates [-i|--image]
5922+
```
5923+
5924+
- Options:
5925+
- _-i|--image_: show updates using current/next SONiC image
5926+
5927+
Valid values:
5928+
- current
5929+
- next
5930+
5931+
Default:
5932+
- current
5933+
5934+
- Example:
5935+
```bash
5936+
admin@sonic:~$ sudo show platform firmware updates
5937+
Chassis Module Component Firmware Version (Current/Available) Status
5938+
--------- -------- ----------- ------------------------------------------ ------------------------------------------------- ------------------
5939+
MSN3800 N/A ONIE /usr/local/lib/firmware/mellanox/onie.bin 2020.11-5.2.0022-9600 / 2020.11-5.2.0024-9600 update is required
5940+
SSD /usr/local/lib/firmware/mellanox/ssd.bin 0202-000 / 0204-000 update is required
5941+
BIOS /usr/local/lib/firmware/mellanox/bios.bin 0ACLH004_02.02.008_9600 / 0ACLH004_02.02.010_9600 update is required
5942+
CPLD1 /usr/local/lib/firmware/mellanox/cpld.mpfa CPLD000120_REV0900 / CPLD000120_REV0900 up-to-date
5943+
CPLD2 /usr/local/lib/firmware/mellanox/cpld.mpfa CPLD000165_REV0500 / CPLD000165_REV0500 up-to-date
5944+
CPLD3 /usr/local/lib/firmware/mellanox/cpld.mpfa CPLD000166_REV0300 / CPLD000166_REV0300 up-to-date
5945+
CPLD4 /usr/local/lib/firmware/mellanox/cpld.mpfa CPLD000167_REV0100 / CPLD000167_REV0100 up-to-date
5946+
```
5947+
5948+
- Note:
5949+
- current/next values for _-i|--image_ are taken from `sonic-installer list`
5950+
```bash
5951+
admin@sonic:~$ sudo sonic-installer list
5952+
Current: SONiC-OS-202012.0-fb89c28c9
5953+
Next: SONiC-OS-201911.0-2bec3004e
5954+
Available:
5955+
SONiC-OS-202012.0-fb89c28c9
5956+
SONiC-OS-201911.0-2bec3004e
5957+
```
5958+
5959+
**show platform firmware version**
5960+
5961+
This command displays platform components firmware utility version.
5962+
5963+
- Usage:
5964+
```bash
5965+
show platform firmware version
5966+
```
5967+
5968+
- Example:
5969+
```bash
5970+
admin@sonic:~$ show platform firmware version
5971+
fwutil version 2.0.0.0
59085972
```
59095973

59105974
### Platform Component Firmware config commands
@@ -5920,30 +5984,35 @@ config platform firmware install chassis component <component_name> fw <fw_path>
59205984
config platform firmware install module <module_name> component <component_name> fw <fw_path> [-y|--yes]
59215985
```
59225986

5987+
- Options:
5988+
- _-y|--yes_: automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
5989+
59235990
- Example:
59245991
```bash
5925-
admin@sonic:~$ sudo config platform firmware install chassis component BIOS fw /etc/mlnx/fw/sn3800/chassis1/bios.bin
5992+
admin@sonic:~$ sudo config platform firmware install chassis component BIOS fw /usr/local/lib/firmware/mellanox/sn3800/chassis1/bios.bin
5993+
Warning: Immediate cold reboot is required to complete BIOS firmware update.
59265994
New firmware will be installed, continue? [y/N]: y
59275995
Installing firmware:
5928-
/etc/mlnx/fw/sn3800/chassis1/bios.bin
5996+
/usr/local/lib/firmware/mellanox/sn3800/chassis1/bios.bin
59295997

5930-
admin@sonic:~$ sudo config platform firmware install module Module1 component BIOS fw http://mellanox.com/fw/sn3800/module1/bios.bin
5998+
admin@sonic:~$ sudo config platform firmware install module Module1 component BIOS fw https://www.mellanox.com/fw/sn3800/module1/bios.bin
5999+
Warning: Immediate cold reboot is required to complete BIOS firmware update.
59316000
New firmware will be installed, continue? [y/N]: y
59326001
Downloading firmware:
59336002
[##################################################] 100%
59346003
Installing firmware:
59356004
/tmp/bios.bin
59366005
```
59376006
5938-
Supported options:
5939-
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
6007+
- Note:
6008+
- <fw_path> can be absolute path or URL
59406009
59416010
**config platform firmware update**
59426011
5943-
This command is used for automatic FW update of all available platform components.
6012+
This command is used to update a platform component firmware from current/next SONiC image.
59446013
Both modular and non modular chassis platforms are supported.
59456014
5946-
Automatic FW update requires `platform_components.json` to be created and placed at:
6015+
FW update requires `platform_components.json` to be created and placed at:
59476016
sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.json
59486017
59496018
Example:
@@ -5954,19 +6023,16 @@ Example:
59546023
"Chassis1": {
59556024
"component": {
59566025
"BIOS": {
5957-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
5958-
"version": "0ACLH003_02.02.010",
5959-
"info": "Cold reboot is required"
6026+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/bios.bin",
6027+
"version": "<bios_version>"
59606028
},
59616029
"CPLD": {
5962-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
5963-
"version": "10",
5964-
"info": "Power cycle is required"
6030+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/cpld.bin",
6031+
"version": "<cpld_version>"
59656032
},
59666033
"FPGA": {
5967-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
5968-
"version": "5",
5969-
"info": "Power cycle is required"
6034+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/fpga.bin",
6035+
"version": "<fpga_version>"
59706036
}
59716037
}
59726038
}
@@ -5981,19 +6047,16 @@ Example:
59816047
"Chassis1": {
59826048
"component": {
59836049
"BIOS": {
5984-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
5985-
"version": "0ACLH003_02.02.010",
5986-
"info": "Cold reboot is required"
6050+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/bios.bin",
6051+
"version": "<bios_version>"
59876052
},
59886053
"CPLD": {
5989-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
5990-
"version": "10",
5991-
"info": "Power cycle is required"
6054+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/cpld.bin",
6055+
"version": "<cpld_version>"
59926056
},
59936057
"FPGA": {
5994-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
5995-
"version": "5",
5996-
"info": "Power cycle is required"
6058+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/chassis1/fpga.bin",
6059+
"version": "<fpga_version>"
59976060
}
59986061
}
59996062
}
@@ -6002,51 +6065,64 @@ Example:
60026065
"Module1": {
60036066
"component": {
60046067
"CPLD": {
6005-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/cpld.bin",
6006-
"version": "10",
6007-
"info": "Power cycle is required"
6068+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/module1/cpld.bin",
6069+
"version": "<cpld_version>"
60086070
},
60096071
"FPGA": {
6010-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/fpga.bin",
6011-
"version": "5",
6012-
"info": "Power cycle is required"
6072+
"firmware": "/usr/local/lib/firmware/<platform_name>/<onie_platform>/module1/fpga.bin",
6073+
"version": "<fpga_version>"
60136074
}
60146075
}
60156076
}
60166077
}
60176078
}
60186079
```
60196080
6020-
Note: FW update will be skipped if component definition is not provided (e.g., 'BIOS': { })
6021-
60226081
- Usage:
60236082
```bash
6024-
config platform firmware update [-y|--yes] [-f|--force] [-i|--image=current|next]
6083+
config platform firmware update chassis component <component_name> fw [-y|--yes] [-f|--force] [-i|--image]
6084+
config platform firmware update module <module_name> component <component_name> fw [-y|--yes] [-f|--force] [-i|--image]
60256085
```
60266086
6087+
- Options:
6088+
- _-y|--yes_: automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
6089+
- _-f|--force_: update FW regardless the current version
6090+
- _-i|--image_: update FW using current/next SONiC image
6091+
6092+
Valid values:
6093+
- current
6094+
- next
6095+
6096+
Default:
6097+
- current
6098+
60276099
- Example:
60286100
```bash
6029-
admin@sonic:~$ sudo config platform firmware update
6030-
Chassis Module Component Firmware Version Status Info
6031-
--------- -------- ----------- ------------------------------------- ------------------------------------------------- ------------------ -----------------------
6032-
Chassis1 N/A BIOS /etc/mlnx/fw/sn3800/chassis1/bios.bin 0ACLH004_02.02.007_9600 / 0ACLH004_02.02.007_9600 up-to-date Cold reboot is required
6033-
CPLD /etc/mlnx/fw/sn3800/chassis1/cpld.bin 5.3.3.1 / 5.3.3.2 update is required Power cycle is required
6101+
admin@sonic:~$ sudo config platform firmware update chassis component BIOS fw
6102+
Warning: Immediate cold reboot is required to complete BIOS firmware update.
60346103
New firmware will be installed, continue? [y/N]: y
6104+
Updating firmware:
6105+
/usr/local/lib/firmware/mellanox/x86_64-mlnx_msn3800-r0/chassis1/bios.bin
60356106

6036-
Summary:
6037-
6038-
Chassis Module Component Status
6039-
--------- -------- ----------- ----------
6040-
Chassis1 N/A BIOS up-to-date
6041-
CPLD success
6107+
admin@sonic:~$ sudo config platform firmware update module Module1 component BIOS fw
6108+
Warning: Immediate cold reboot is required to complete BIOS firmware update.
6109+
New firmware will be installed, continue? [y/N]: y
6110+
Updating firmware:
6111+
/usr/local/lib/firmware/mellanox/x86_64-mlnx_msn3800-r0/module1/bios.bin
60426112
```
60436113
6044-
Supported options:
6045-
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
6046-
2. -f|--force - install FW regardless the current version
6047-
3. -i|--image - update FW using current/next SONiC image
6048-
6049-
Note: the default option is --image=current (current/next values are taken from `sonic-installer list`)
6114+
- Note:
6115+
- FW update will be disabled if component definition is not provided (e.g., 'BIOS': { })
6116+
- FW version will be read from image if `version` field is not provided
6117+
- current/next values for _-i|--image_ are taken from `sonic-installer list`
6118+
```bash
6119+
admin@sonic:~$ sudo sonic-installer list
6120+
Current: SONiC-OS-202012.0-fb89c28c9
6121+
Next: SONiC-OS-201911.0-2bec3004e
6122+
Available:
6123+
SONiC-OS-202012.0-fb89c28c9
6124+
SONiC-OS-201911.0-2bec3004e
6125+
```
60506126
60516127
### Platform Component Firmware vendor specific behaviour
60526128

0 commit comments

Comments
 (0)