diff --git a/doc/Command-Reference.md b/doc/Command-Reference.md index e78cabb5b0..1515cc194d 100644 --- a/doc/Command-Reference.md +++ b/doc/Command-Reference.md @@ -31,9 +31,12 @@ * [BGP](#bgp) * [BGP show commands](#bgp-show-commands) * [BGP config commands](#bgp-config-commands) -* [Container Auto-restart](#container-auto-restart) - * [Container Auto-restart show commands](#container-auto-restart-show-commands) - * [Container Auto-restart config command](#container-auto-restart-config-command) +* [Platform Component Firmware](#platform-component-firmware) + * [Platform Component Firmware show commands](#platform-component-firmware-show-commands) + * [Platform Component Firmware config commands](#platform-component-firmware-config-commands) +* [Container Auto-restart](#container-autorestart-commands) + * [Container Auto-restart show commands](#container-autorestart-show-commands) + * [Container Auto-restart config command](#container-autorestart-config-command) * [DHCP Relay](#dhcp-relay) * [DHCP Relay config commands](#dhcp-relay-config-commands) * [Drop Counters](#drop-counters) @@ -1734,6 +1737,173 @@ This command is used to remove particular IPv4 or IPv6 BGP neighbor configuratio Go Back To [Beginning of the document](#) or [Beginning of this section](#bgp) + +## Platform Component Firmware + +### Platform Component Firmware show commands + +**show platform firmware** + +This command displays platform components firmware status information. + +- Usage: +```bash +show platform firmware +``` + +- Example: +```bash +root@sonic:/home/admin# show platform firmware +Chassis Module Component Version Description +--------- -------- ----------- ----------------------- --------------------------------------- +Chassis1 N/A BIOS 0ACLH004_02.02.007_9600 BIOS - Basic Input/Output System + CPLD 5.3.3.1 CPLD - includes all CPLDs in the switch +``` + +### Platform Component Firmware config commands + +**config platform firmware install** + +This command is used to install a platform component firmware. +Both modular and non modular chassis platforms are supported. + +- Usage: +```bash +config platform firmware install chassis component fw [-y|--yes] +config platform firmware install module component fw [-y|--yes] +``` + +- Example: +```bash +root@sonic:/home/admin# config platform firmware install chassis component BIOS fw /etc/mlnx/fw/sn3800/chassis1/bios.bin +New firmware will be installed, continue? [y/N]: y +Installing firmware: + /etc/mlnx/fw/sn3800/chassis1/bios.bin + +root@sonic:/home/admin# config platform firmware install module Module1 component BIOS fw http://mellanox.com/fw/sn3800/module1/bios.bin +New firmware will be installed, continue? [y/N]: y +Downloading firmware: + [##################################################] 100% +Installing firmware: + /tmp/bios.bin +``` + +Supported options: +1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively + +**config platform firmware update** + +This command is used for automatic FW update of all available platform components. +Both modular and non modular chassis platforms are supported. + +Automatic FW update requires `platform_components.json` to be created and placed at: +sonic-buildimage/device///platform_components.json + +Example: +1. Non modular chassis platform +```json +{ + "chassis": { + "Chassis1": { + "component": { + "BIOS": { + "firmware": "/etc//fw//chassis1/bios.bin", + "version": "0ACLH003_02.02.010", + "info": "Cold reboot is required" + }, + "CPLD": { + "firmware": "/etc//fw//chassis1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//chassis1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + } +} +``` + +2. Modular chassis platform +```json +{ + "chassis": { + "Chassis1": { + "component": { + "BIOS": { + "firmware": "/etc//fw//chassis1/bios.bin", + "version": "0ACLH003_02.02.010", + "info": "Cold reboot is required" + }, + "CPLD": { + "firmware": "/etc//fw//chassis1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//chassis1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + }, + "module": { + "Module1": { + "component": { + "CPLD": { + "firmware": "/etc//fw//module1/cpld.bin", + "version": "10", + "info": "Power cycle is required" + }, + "FPGA": { + "firmware": "/etc//fw//module1/fpga.bin", + "version": "5", + "info": "Power cycle is required" + } + } + } + } +} +``` + +Note: FW update will be skipped if component definition is not provided (e.g., 'BIOS': { }) + +- Usage: +```bash +config platform firmware update [-y|--yes] [-f|--force] [-i|--image=current|next] +``` + +- Example: +```bash +root@sonic:/home/admin# config platform firmware update +Chassis Module Component Firmware Version Status Info +--------- -------- ----------- ------------------------------------- ------------------------------------------------- ------------------ ----------------------- +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 + CPLD /etc/mlnx/fw/sn3800/chassis1/cpld.bin 5.3.3.1 / 5.3.3.2 update is required Power cycle is required +New firmware will be installed, continue? [y/N]: y + +Summary: + +Chassis Module Component Status +--------- -------- ----------- ---------- +Chassis1 N/A BIOS up-to-date + CPLD success +``` + +Supported options: +1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively +2. -f|--force - install FW regardless the current version +3. -i|--image - update FW using current/next SONiC image + +Note: the default option is --image=current + +Go Back To [Beginning of the document](#) or [Beginning of this section](#component-firmware) + + ## Container Auto-restart SONiC includes a feature in which Docker containers can be automatically shut @@ -3788,172 +3958,6 @@ This command is used to delete a configured NTP server IP address. Go Back To [Beginning of the document](#) or [Beginning of this section](#NTP) -## Firmware - -### Show commands - -**show platform firmware** - -This command displays platform components firmware status information. - -- Usage: -```bash -show platform firmware -``` - -- Example: -```bash -root@sonic:/home/admin# show platform firmware -Chassis Module Component Version Description ---------- -------- ----------- ----------------------- --------------------------------------- -Chassis1 N/A BIOS 0ACLH004_02.02.007_9600 BIOS - Basic Input/Output System - CPLD 5.3.3.1 CPLD - includes all CPLDs in the switch -``` - -### Config commands - -**config platform firmware install** - -This command is used to install a platform component firmware. -Both modular and non modular chassis platforms are supported. - -- Usage: -```bash -config platform firmware install chassis component fw [-y|--yes] -config platform firmware install module component fw [-y|--yes] -``` - -- Example: -```bash -root@sonic:/home/admin# config platform firmware install chassis component BIOS fw /etc/mlnx/fw/sn3800/chassis1/bios.bin -New firmware will be installed, continue? [y/N]: y -Installing firmware: - /etc/mlnx/fw/sn3800/chassis1/bios.bin - -root@sonic:/home/admin# config platform firmware install module Module1 component BIOS fw http://mellanox.com/fw/sn3800/module1/bios.bin -New firmware will be installed, continue? [y/N]: y -Downloading firmware: - [##################################################] 100% -Installing firmware: - /tmp/bios.bin -``` - -Supported options: -1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively - -**config platform firmware update** - -This command is used for automatic FW update of all available platform components. -Both modular and non modular chassis platforms are supported. - -Automatic FW update requires `platform_components.json` to be created and placed at: -sonic-buildimage/device///platform_components.json - -Example: -1. Non modular chassis platform -```json -{ - "chassis": { - "Chassis1": { - "component": { - "BIOS": { - "firmware": "/etc//fw//chassis1/bios.bin", - "version": "0ACLH003_02.02.010", - "info": "Cold reboot is required" - }, - "CPLD": { - "firmware": "/etc//fw//chassis1/cpld.bin", - "version": "10", - "info": "Power cycle is required" - }, - "FPGA": { - "firmware": "/etc//fw//chassis1/fpga.bin", - "version": "5", - "info": "Power cycle is required" - } - } - } - } -} -``` - -2. Modular chassis platform -```json -{ - "chassis": { - "Chassis1": { - "component": { - "BIOS": { - "firmware": "/etc//fw//chassis1/bios.bin", - "version": "0ACLH003_02.02.010", - "info": "Cold reboot is required" - }, - "CPLD": { - "firmware": "/etc//fw//chassis1/cpld.bin", - "version": "10", - "info": "Power cycle is required" - }, - "FPGA": { - "firmware": "/etc//fw//chassis1/fpga.bin", - "version": "5", - "info": "Power cycle is required" - } - } - } - }, - "module": { - "Module1": { - "component": { - "CPLD": { - "firmware": "/etc//fw//module1/cpld.bin", - "version": "10", - "info": "Power cycle is required" - }, - "FPGA": { - "firmware": "/etc//fw//module1/fpga.bin", - "version": "5", - "info": "Power cycle is required" - } - } - } - } -} -``` - -Note: FW update will be skipped if component definition is not provided (e.g., 'BIOS': { }) - -- Usage: -```bash -config platform firmware update [-y|--yes] [-f|--force] [-i|--image=current|next] -``` - -- Example: -```bash -root@sonic:/home/admin# config platform firmware update -Chassis Module Component Firmware Version Status Info ---------- -------- ----------- ------------------------------------- ------------------------------------------------- ------------------ ----------------------- -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 - CPLD /etc/mlnx/fw/sn3800/chassis1/cpld.bin 5.3.3.1 / 5.3.3.2 update is required Power cycle is required -New firmware will be installed, continue? [y/N]: y - -Summary: - -Chassis Module Component Status ---------- -------- ----------- ---------- -Chassis1 N/A BIOS up-to-date - CPLD success -``` - -Supported options: -1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively -2. -f|--force - install FW regardless the current version -3. -i|--image - update FW using current/next SONiC image - -Note: the default option is --image=current - -Go Back To [Beginning of the document](#) or [Beginning of this section](#firmware) - - ## Platform Specific Commands There are few commands that are platform specific. Mellanox has used this feature and implemented Mellanox specific commands as follows.