Skip to content

Commit bf81c6f

Browse files
committed
[fwutil]: Fix review comments: update CLI documentation.
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
1 parent ae1463e commit bf81c6f

1 file changed

Lines changed: 172 additions & 173 deletions

File tree

doc/Command-Reference.md

Lines changed: 172 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@
3131
* [BGP](#bgp)
3232
* [BGP show commands](#bgp-show-commands)
3333
* [BGP config commands](#bgp-config-commands)
34-
* [Platform Component Firmware](#platform-component-firmware)
35-
* [Platform Component Firmware show commands](#platform-component-firmware-show-commands)
36-
* [Platform Component Firmware config commands](#platform-component-firmware-config-commands)
37-
* [Container Auto-restart](#container-autorestart-commands)
38-
* [Container Auto-restart show commands](#container-autorestart-show-commands)
39-
* [Container Auto-restart config command](#container-autorestart-config-command)
34+
* [Container Auto-restart](#container-auto-restart)
35+
* [Container Auto-restart show commands](#container-auto-restart-show-commands)
36+
* [Container Auto-restart config command](#container-auto-restart-config-command)
4037
* [DHCP Relay](#dhcp-relay)
4138
* [DHCP Relay config commands](#dhcp-relay-config-commands)
4239
* [Drop Counters](#drop-counters)
@@ -76,6 +73,9 @@
7673
* [NTP](#ntp)
7774
* [NTP show commands](#ntp-show-commands)
7875
* [NTP config commands](#ntp-config-commands)
76+
* [Platform Component Firmware](#platform-component-firmware)
77+
* [Platform Component Firmware show commands](#platform-component-firmware-show-commands)
78+
* [Platform Component Firmware config commands](#platform-component-firmware-config-commands)
7979
* [Platform Specific Commands](#platform-specific-commands)
8080
* [PortChannels](#portchannels)
8181
* [PortChannel Show commands](#portchannel-show-commands)
@@ -1737,173 +1737,6 @@ This command is used to remove particular IPv4 or IPv6 BGP neighbor configuratio
17371737
17381738
Go Back To [Beginning of the document](#) or [Beginning of this section](#bgp)
17391739
1740-
1741-
## Platform Component Firmware
1742-
1743-
### Platform Component Firmware show commands
1744-
1745-
**show platform firmware**
1746-
1747-
This command displays platform components firmware status information.
1748-
1749-
- Usage:
1750-
```bash
1751-
show platform firmware
1752-
```
1753-
1754-
- Example:
1755-
```bash
1756-
root@sonic:/home/admin# show platform firmware
1757-
Chassis Module Component Version Description
1758-
--------- -------- ----------- ----------------------- ---------------------------------------
1759-
Chassis1 N/A BIOS 0ACLH004_02.02.007_9600 BIOS - Basic Input/Output System
1760-
CPLD 5.3.3.1 CPLD - includes all CPLDs in the switch
1761-
```
1762-
1763-
### Platform Component Firmware config commands
1764-
1765-
**config platform firmware install**
1766-
1767-
This command is used to install a platform component firmware.
1768-
Both modular and non modular chassis platforms are supported.
1769-
1770-
- Usage:
1771-
```bash
1772-
config platform firmware install chassis component <component_name> fw <fw_path> [-y|--yes]
1773-
config platform firmware install module <module_name> component <component_name> fw <fw_path> [-y|--yes]
1774-
```
1775-
1776-
- Example:
1777-
```bash
1778-
root@sonic:/home/admin# config platform firmware install chassis component BIOS fw /etc/mlnx/fw/sn3800/chassis1/bios.bin
1779-
New firmware will be installed, continue? [y/N]: y
1780-
Installing firmware:
1781-
/etc/mlnx/fw/sn3800/chassis1/bios.bin
1782-
1783-
root@sonic:/home/admin# config platform firmware install module Module1 component BIOS fw http://mellanox.com/fw/sn3800/module1/bios.bin
1784-
New firmware will be installed, continue? [y/N]: y
1785-
Downloading firmware:
1786-
[##################################################] 100%
1787-
Installing firmware:
1788-
/tmp/bios.bin
1789-
```
1790-
1791-
Supported options:
1792-
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
1793-
1794-
**config platform firmware update**
1795-
1796-
This command is used for automatic FW update of all available platform components.
1797-
Both modular and non modular chassis platforms are supported.
1798-
1799-
Automatic FW update requires `platform_components.json` to be created and placed at:
1800-
sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.json
1801-
1802-
Example:
1803-
1. Non modular chassis platform
1804-
```json
1805-
{
1806-
"chassis": {
1807-
"Chassis1": {
1808-
"component": {
1809-
"BIOS": {
1810-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
1811-
"version": "0ACLH003_02.02.010",
1812-
"info": "Cold reboot is required"
1813-
},
1814-
"CPLD": {
1815-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
1816-
"version": "10",
1817-
"info": "Power cycle is required"
1818-
},
1819-
"FPGA": {
1820-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
1821-
"version": "5",
1822-
"info": "Power cycle is required"
1823-
}
1824-
}
1825-
}
1826-
}
1827-
}
1828-
```
1829-
1830-
2. Modular chassis platform
1831-
```json
1832-
{
1833-
"chassis": {
1834-
"Chassis1": {
1835-
"component": {
1836-
"BIOS": {
1837-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
1838-
"version": "0ACLH003_02.02.010",
1839-
"info": "Cold reboot is required"
1840-
},
1841-
"CPLD": {
1842-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
1843-
"version": "10",
1844-
"info": "Power cycle is required"
1845-
},
1846-
"FPGA": {
1847-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
1848-
"version": "5",
1849-
"info": "Power cycle is required"
1850-
}
1851-
}
1852-
}
1853-
},
1854-
"module": {
1855-
"Module1": {
1856-
"component": {
1857-
"CPLD": {
1858-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/cpld.bin",
1859-
"version": "10",
1860-
"info": "Power cycle is required"
1861-
},
1862-
"FPGA": {
1863-
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/fpga.bin",
1864-
"version": "5",
1865-
"info": "Power cycle is required"
1866-
}
1867-
}
1868-
}
1869-
}
1870-
}
1871-
```
1872-
1873-
Note: FW update will be skipped if component definition is not provided (e.g., 'BIOS': { })
1874-
1875-
- Usage:
1876-
```bash
1877-
config platform firmware update [-y|--yes] [-f|--force] [-i|--image=current|next]
1878-
```
1879-
1880-
- Example:
1881-
```bash
1882-
root@sonic:/home/admin# config platform firmware update
1883-
Chassis Module Component Firmware Version Status Info
1884-
--------- -------- ----------- ------------------------------------- ------------------------------------------------- ------------------ -----------------------
1885-
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
1886-
CPLD /etc/mlnx/fw/sn3800/chassis1/cpld.bin 5.3.3.1 / 5.3.3.2 update is required Power cycle is required
1887-
New firmware will be installed, continue? [y/N]: y
1888-
1889-
Summary:
1890-
1891-
Chassis Module Component Status
1892-
--------- -------- ----------- ----------
1893-
Chassis1 N/A BIOS up-to-date
1894-
CPLD success
1895-
```
1896-
1897-
Supported options:
1898-
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
1899-
2. -f|--force - install FW regardless the current version
1900-
3. -i|--image - update FW using current/next SONiC image
1901-
1902-
Note: the default option is --image=current
1903-
1904-
Go Back To [Beginning of the document](#) or [Beginning of this section](#component-firmware)
1905-
1906-
19071740
## Container Auto-restart
19081741
19091742
SONiC includes a feature in which Docker containers can be automatically shut
@@ -3958,6 +3791,172 @@ This command is used to delete a configured NTP server IP address.
39583791
Go Back To [Beginning of the document](#) or [Beginning of this section](#NTP)
39593792
39603793
3794+
## Platform Component Firmware
3795+
3796+
### Platform Component Firmware show commands
3797+
3798+
**show platform firmware**
3799+
3800+
This command displays platform components firmware status information.
3801+
3802+
- Usage:
3803+
```bash
3804+
show platform firmware
3805+
```
3806+
3807+
- Example:
3808+
```bash
3809+
root@sonic:/home/admin# show platform firmware
3810+
Chassis Module Component Version Description
3811+
--------- -------- ----------- ----------------------- ---------------------------------------
3812+
Chassis1 N/A BIOS 0ACLH004_02.02.007_9600 BIOS - Basic Input/Output System
3813+
CPLD 5.3.3.1 CPLD - includes all CPLDs in the switch
3814+
```
3815+
3816+
### Platform Component Firmware config commands
3817+
3818+
**config platform firmware install**
3819+
3820+
This command is used to install a platform component firmware.
3821+
Both modular and non modular chassis platforms are supported.
3822+
3823+
- Usage:
3824+
```bash
3825+
config platform firmware install chassis component <component_name> fw <fw_path> [-y|--yes]
3826+
config platform firmware install module <module_name> component <component_name> fw <fw_path> [-y|--yes]
3827+
```
3828+
3829+
- Example:
3830+
```bash
3831+
root@sonic:/home/admin# config platform firmware install chassis component BIOS fw /etc/mlnx/fw/sn3800/chassis1/bios.bin
3832+
New firmware will be installed, continue? [y/N]: y
3833+
Installing firmware:
3834+
/etc/mlnx/fw/sn3800/chassis1/bios.bin
3835+
3836+
root@sonic:/home/admin# config platform firmware install module Module1 component BIOS fw http://mellanox.com/fw/sn3800/module1/bios.bin
3837+
New firmware will be installed, continue? [y/N]: y
3838+
Downloading firmware:
3839+
[##################################################] 100%
3840+
Installing firmware:
3841+
/tmp/bios.bin
3842+
```
3843+
3844+
Supported options:
3845+
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
3846+
3847+
**config platform firmware update**
3848+
3849+
This command is used for automatic FW update of all available platform components.
3850+
Both modular and non modular chassis platforms are supported.
3851+
3852+
Automatic FW update requires `platform_components.json` to be created and placed at:
3853+
sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.json
3854+
3855+
Example:
3856+
1. Non modular chassis platform
3857+
```json
3858+
{
3859+
"chassis": {
3860+
"Chassis1": {
3861+
"component": {
3862+
"BIOS": {
3863+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
3864+
"version": "0ACLH003_02.02.010",
3865+
"info": "Cold reboot is required"
3866+
},
3867+
"CPLD": {
3868+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
3869+
"version": "10",
3870+
"info": "Power cycle is required"
3871+
},
3872+
"FPGA": {
3873+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
3874+
"version": "5",
3875+
"info": "Power cycle is required"
3876+
}
3877+
}
3878+
}
3879+
}
3880+
}
3881+
```
3882+
3883+
2. Modular chassis platform
3884+
```json
3885+
{
3886+
"chassis": {
3887+
"Chassis1": {
3888+
"component": {
3889+
"BIOS": {
3890+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin",
3891+
"version": "0ACLH003_02.02.010",
3892+
"info": "Cold reboot is required"
3893+
},
3894+
"CPLD": {
3895+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin",
3896+
"version": "10",
3897+
"info": "Power cycle is required"
3898+
},
3899+
"FPGA": {
3900+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin",
3901+
"version": "5",
3902+
"info": "Power cycle is required"
3903+
}
3904+
}
3905+
}
3906+
},
3907+
"module": {
3908+
"Module1": {
3909+
"component": {
3910+
"CPLD": {
3911+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/cpld.bin",
3912+
"version": "10",
3913+
"info": "Power cycle is required"
3914+
},
3915+
"FPGA": {
3916+
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/fpga.bin",
3917+
"version": "5",
3918+
"info": "Power cycle is required"
3919+
}
3920+
}
3921+
}
3922+
}
3923+
}
3924+
```
3925+
3926+
Note: FW update will be skipped if component definition is not provided (e.g., 'BIOS': { })
3927+
3928+
- Usage:
3929+
```bash
3930+
config platform firmware update [-y|--yes] [-f|--force] [-i|--image=current|next]
3931+
```
3932+
3933+
- Example:
3934+
```bash
3935+
root@sonic:/home/admin# config platform firmware update
3936+
Chassis Module Component Firmware Version Status Info
3937+
--------- -------- ----------- ------------------------------------- ------------------------------------------------- ------------------ -----------------------
3938+
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
3939+
CPLD /etc/mlnx/fw/sn3800/chassis1/cpld.bin 5.3.3.1 / 5.3.3.2 update is required Power cycle is required
3940+
New firmware will be installed, continue? [y/N]: y
3941+
3942+
Summary:
3943+
3944+
Chassis Module Component Status
3945+
--------- -------- ----------- ----------
3946+
Chassis1 N/A BIOS up-to-date
3947+
CPLD success
3948+
```
3949+
3950+
Supported options:
3951+
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively
3952+
2. -f|--force - install FW regardless the current version
3953+
3. -i|--image - update FW using current/next SONiC image
3954+
3955+
Note: the default option is --image=current
3956+
3957+
Go Back To [Beginning of the document](#) or [Beginning of this section](#platform-component-firmware)
3958+
3959+
39613960
## Platform Specific Commands
39623961
39633962
There are few commands that are platform specific. Mellanox has used this feature and implemented Mellanox specific commands as follows.

0 commit comments

Comments
 (0)