From 2523523acba694a55061e8c4e4884bddd8af8e40 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Fri, 23 Aug 2019 14:04:57 +0000 Subject: [PATCH 1/5] Added fwutil High Level Design. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 276 ++++++++++++++++++++ doc/fwutil/images/fwutil_hld.svg | 430 +++++++++++++++++++++++++++++++ 2 files changed, 706 insertions(+) create mode 100644 doc/fwutil/fwutil.md create mode 100755 doc/fwutil/images/fwutil_hld.svg diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md new file mode 100644 index 00000000000..beebef37bcc --- /dev/null +++ b/doc/fwutil/fwutil.md @@ -0,0 +1,276 @@ +# SONiC FW utility + +## High Level Design document + +## Table of contents +- [About this manual](#about-this-manual) +- [Revision](#revision) +- [Abbreviations](#abbreviations) +- [1 Introduction](#1-introduction) + - [1.1 Feature overview](#1.1-feature-overview) + - [1.2 Requirements](#1.2-requirements) + - [1.2.1 Command interface](#1.2.1-command-interface) + - [1.2.2 Error handling](#1.2.2-error-handling) + - [1.2.3 Event logging](#1.2.3-event-logging) +- [2 Design](#2-design) + - [2.1 Overview](#2.1-overview) + - [2.2 FW utility](#2.2-fw-utility) + - [2.2.1 Command structure](#2.2.1-command-structure) + - [2.2.2 Command interface](#2.2.2-command-interface) + - [2.2.2.1 Show commands](#2.2.2.1-show-commands) + - [2.2.2.1.1 Overview](#2.2.2.1.1-overview) + - [2.2.2.1.2 Description](#2.2.2.1.2-description) + - [2.2.2.2 Install commands](#2.2.2.2-install-commands) + - [2.2.2.2.1 Overview](#2.2.2.2.1-overview) + - [2.2.2.2.2 Description](#2.2.2.2.2-description) + - [2.2.2.3 Update commands](#2.2.2.3-update-commands) + - [2.2.2.3.1 Overview](#2.2.2.3.1-overview) + - [2.2.2.3.2 Description](#2.2.2.3.2-description) +- [3 Tests](#3-tests) + - [3.1 Unit tests](#3.1-unit-tests) + - [3.2 Functional tests](#3.2-functional-tests) + +## About this manual + +This document provides general information about FW utility implementation in SONiC. + +## Revision + +| Rev | Date | Author | Description | +|:---:|:----------:|:--------------:|:----------------| +| 0.1 | 21/08/2019 | Nazarii Hnydyn | Initial version | + +## Abbreviations + +| Term | Meaning | +|:-------|:----------------------------------------------------| +| FW | Firmware | +| SONiC | Software for Open Networking in the Cloud | +| PSU | Power Supply Unit | +| QSFP | Quad Small Form-factor Pluggable | +| EEPROM | Electrically Erasable Programmable Read-Only Memory | +| I2C | Inter-Integrated Circuit | +| SPI | Serial Peripheral Interface | +| JTAG | Joint Test Action Group | +| BIOS | Basic Input/Output System | +| CPLD | Complex Programmable Logic Device | +| FPGA | Field-Programmable Gate Array | +| URL | Uniform Resource Locator | +| API | Application Programming Interface | +| N/A | Not Applicable/Not Available | + +## List of figures +[Figure 1: FW utility High Level Design](#figure-1-fw-utility-high-level-design) + +## List of tables +[Table 1: Event logging](#table-1-event-logging) + +# 1 Introduction + +## 1.1 Feature overview + +A modern network switch is a sophisticated equipment which consists of many auxiliary components +which are responsible for managing different subsystems (e.g., PSU/FAN/QSFP/EEPROM/THERMAL) +and providing necessary interfaces (e.g., I2C/SPI/JTAG). + +Basically these components are complex programmable logic devices with it's own HW architecture +and software. The most important are BIOS/CPLD/FPGA etc. + +It is very important to always have the latest recommended software version to improve device +stability, security and performance. Also, software updates can add new features +and remove outdated ones. + +In order to make software update as simple as possible and to provide a nice user frindly +interface for various maintenance operations (e.g., install a new FW or query current version) +we might need a dedicated FW utility. + +## 1.2 Requirements + +### 1.2.1 Command interface + +**This feature will support the following commands:** +1. show: display FW versions +2. install: manual FW installation +3. update: automatic FW installation + +### 1.2.2 Error handling + +**This feature will provide error handling for the next situations:** +1. Invalid input +2. Incompatible options/parameters +3. Invalid/nonexistent FW URL/path + +**Note:** FW binary validation (checksum, format, etc.) should be done by Low Level Utility + +### 1.2.3 Event logging + +**This feature will provide event logging for the next situations:** +1. FW binary downloading over URL: start/end +2. FW binary downloading over URL: error +3. FW binary installation: start/end +4. FW binary installation: error + +###### Table 1: Event logging + +| Event | Severity | +|:------------------------------------------|:---------| +| FW binary downloading over URL: start/end | NOTICE | +| FW binary downloading over URL: error | ERROR | +| FW binary installation: start/end | INFO | +| FW binary installation: error | ERROR | + +**Note:** Some extra information also shall be logged: +1. Component location (e.g., Chassis1/Module1/BIOS) +2. Operation result (e.g., success/failure) + +# 2 Design + +## 2.1 Overview + +![FW utility High Level Design](images/fwutil_hld.svg "Figure 1: FW utility High Level Design") + +###### Figure 1: FW utility High Level Design + +In order to improve scalability and performance a modern network switches provide different architecture solutions: +1. Non modular chassis platforms +2. Modular chassis platforms + +Non modular chassis platforms may contain one or more chassis. +Each chassis may contain it's own set of components. + +Modular chassis platforms may contain one or more chassis. +Each chassis may contain one or more modules and it's own set of components. +Each module may contain it's own set of components. + +Basically each chassis/module may contain one or more components (e.g., BIOS/CPLD/FPGA). + +SONiC platform API provides an interface for FW maintenance operations for both modular +and non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, +but may have different implementation. + +SONiC FW utility uses platform API to interact with the various platform components. + +## 2.2 FW utility + +### 2.2.1 Command structure + +**User interface**: +``` +fwutil +|--- show +| |--- status +| |--- version +|--- install +| |--- chassis +| |--- component +| | |--- fw +| |--- module +| |--- component +| |--- fw +|--- update -o|--online -i|--image= +``` + +**Note:** can be absolute path or URL + +### 2.2.2 Command interface + +#### 2.2.2.1 Show commands + +##### 2.2.2.1.1 Overview + +The purpose of the show commands group is to provide an interface for: +1. FW utility related information query (version, etc.) +2. FW version query for various platform components + +##### 2.2.2.1.2 Description + +**The following command displays FW utility version:** +```bash +root@sonic:~# fwutil show version +fwutil version 1.0.0.0 +``` + +**The following command displays platform components and FW versions:** +```bash +root@sonic:~# fwutil show status +Chassis Module Component Version +-------- ------- --------- ------------------ +Chassis1 N/A BIOS 0ACLH003_02.02.007 + CPLD1 2 + CPLD2 5 + CPLD3 1 + FPGA1 5 + FPGA2 8 + FPGA3 4 +Chassis2 Module1 BIOS 0ACLH004_02.02.007 + CPLD1 5 + CPLD2 8 + CPLD3 4 + FPGA1 8 + FPGA2 11 + FPGA3 7 + Module2 BIOS 0ACLH004_02.02.007 + CPLD1 5 + CPLD2 8 + CPLD3 4 + FPGA1 8 + FPGA2 11 + FPGA3 7 +``` + +#### 2.2.2.2 Install commands + +##### 2.2.2.2.1 Overview + +The purpose of the install commands group is to provide an interface +for manual FW update of various platform components. + +##### 2.2.2.2.2 Description + +**The following command installs FW on non modular chassis platform:** +```bash +root@sonic:~# fwutil install chassis Chassis1 component BIOS fw /home/admin/bios.fw +root@sonic:~# fwutil install chassis Chassis1 component CPLD1 fw /home/admin/cpld1.fw +root@sonic:~# fwutil install chassis Chassis1 component FPGA1 fw /home/admin/fpga1.fw +``` + +**The following command installs FW on modular chassis platform:** +```bash +root@sonic:~# fwutil install chassis Chassis1 module Module1 component BIOS fw /home/admin/bios.fw +root@sonic:~# fwutil install chassis Chassis1 module Module1 component CPLD1 fw /home/admin/cpld1.fw +root@sonic:~# fwutil install chassis Chassis1 module Module1 component FPGA1 fw /home/admin/fpga1.fw +``` + +#### 2.2.2.3 Update commands + +##### 2.2.2.3.1 Overview + +The purpose of the update commands group is to provide an interface +for automatic FW update of all available platform components. + +Different FW sources shall be supported: +1. online - from internet +2. image - from current/next SONiC image + +##### 2.2.2.3.2 Description + +__The following command updates FW of all available platform components:__ +```bash +root@sonic:~# fwutil update --online +root@sonic:~# fwutil update --image=next +``` + +**Note:** the default option is _--image=current_ + +# 3 Tests + +## 3.1 Unit tests + +1. Show FW utility version +2. Show components status + +## 3.2 Functional tests + +1. Install new BIOS/CPLD/FPGA FW on non modular chassis +2. Install new BIOS/CPLD/FPGA FW on modular chassis +3. Update FW on all available chassis components diff --git a/doc/fwutil/images/fwutil_hld.svg b/doc/fwutil/images/fwutil_hld.svg new file mode 100755 index 00000000000..ef3776d958b --- /dev/null +++ b/doc/fwutil/images/fwutil_hld.svg @@ -0,0 +1,430 @@ + + + + + FWUTIL HLD + + + + + + + + + + + + + + Page-1 + + + Rectangle + + + + + + + Rectangle.19 + chassis_base.py + + + + + + + chassis_base.py + + Rounded Rectangle.5 + FW API + + + + + + + + + + + + + + + + + + + + + + FW API + + Rectangle.15 + get_component_name_list + + + + + + + get_component_name_list + + Rectangle.5 + get_firmware_version + + + + + + + get_firmware_version + + Rectangle.6 + install_component_firmware + + + + + + + install_component_firmware + + Rounded Rectangle.25 + MODULE API + + + + + + + + + + + + + + + + + + + + + + MODULE API + + Rectangle.8 + get_num_modules + + + + + + + get_num_modules + + Rectangle.9 + get_all_modules + + + + + + + get_all_modules + + Rectangle.10 + get_module + + + + + + + get_module + + Rectangle.31 + + + + + + + Simple Double Arrow + + + + + + + + Rectangle.55 + FW Utility + + + + + + + FW Utility + + Rectangle.63 + + + + + + + Rounded Rectangle + DEVICE API + + + + + + + + + + + + + + + + + + + + + + DEVICE API + + Rectangle.67 + get_name + + + + + + + get_name + + Rectangle.68 + get_presence + + + + + + + get_presence + + Simple Double Arrow.72 + + + + + + + + Simple Double Arrow.74 + + + + + + + + Simple Double Arrow.75 + + + + + + + + Rounded Rectangle.82 + FW API + + + + + + + + + + + + + + + + + + + + + + FW API + + Rectangle.83 + get_component_name_list + + + + + + + get_component_name_list + + Rectangle.84 + get_firmware_version + + + + + + + get_firmware_version + + Rectangle.85 + install_component_firmware + + + + + + + install_component_firmware + + Rectangle.86 + module_base.py + + + + + + + module_base.py + + Rectangle.88 + get_model + + + + + + + get_model + + Rectangle.89 + get_serial + + + + + + + get_serial + + Rectangle.90 + get_status + + + + + + + get_status + + Rectangle.91 + device_base.py + + + + + + + device_base.py + + Rectangle.92 + Low Level Utility + + + + + + + Low Level Utility + + Simple Double Arrow.93 + + + + + + + + Simple Double Arrow.94 + + + + + + + + Rectangle.95 + HW + + + + + + + HW + + Simple Double Arrow.97 + + + + + + + + From 82f238541de37433bd9b3181a1e426f4d272b841 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Fri, 30 Aug 2019 14:40:30 +0000 Subject: [PATCH 2/5] Updated fwutil HLD: rev 0.2. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 263 ++++-- doc/fwutil/images/fwutil_hld.svg | 512 +++++++----- doc/fwutil/images/install_modular_flow.svg | 777 ++++++++++++++++++ .../images/install_non_modular_flow.svg | 521 ++++++++++++ doc/fwutil/images/show_status_flow.svg | 739 +++++++++++++++++ 5 files changed, 2514 insertions(+), 298 deletions(-) create mode 100755 doc/fwutil/images/install_modular_flow.svg create mode 100755 doc/fwutil/images/install_non_modular_flow.svg create mode 100755 doc/fwutil/images/show_status_flow.svg diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md index beebef37bcc..5cad2383808 100644 --- a/doc/fwutil/fwutil.md +++ b/doc/fwutil/fwutil.md @@ -7,28 +7,33 @@ - [Revision](#revision) - [Abbreviations](#abbreviations) - [1 Introduction](#1-introduction) - - [1.1 Feature overview](#1.1-feature-overview) - - [1.2 Requirements](#1.2-requirements) - - [1.2.1 Command interface](#1.2.1-command-interface) - - [1.2.2 Error handling](#1.2.2-error-handling) - - [1.2.3 Event logging](#1.2.3-event-logging) + - [1.1 Feature overview](#11-feature-overview) + - [1.2 Requirements](#12-requirements) + - [1.2.1 Functionality](#121-functionality) + - [1.2.2 Command interface](#122-command-interface) + - [1.2.3 Error handling](#123-error-handling) + - [1.2.4 Event logging](#124-event-logging) - [2 Design](#2-design) - - [2.1 Overview](#2.1-overview) - - [2.2 FW utility](#2.2-fw-utility) - - [2.2.1 Command structure](#2.2.1-command-structure) - - [2.2.2 Command interface](#2.2.2-command-interface) - - [2.2.2.1 Show commands](#2.2.2.1-show-commands) - - [2.2.2.1.1 Overview](#2.2.2.1.1-overview) - - [2.2.2.1.2 Description](#2.2.2.1.2-description) - - [2.2.2.2 Install commands](#2.2.2.2-install-commands) - - [2.2.2.2.1 Overview](#2.2.2.2.1-overview) - - [2.2.2.2.2 Description](#2.2.2.2.2-description) - - [2.2.2.3 Update commands](#2.2.2.3-update-commands) - - [2.2.2.3.1 Overview](#2.2.2.3.1-overview) - - [2.2.2.3.2 Description](#2.2.2.3.2-description) -- [3 Tests](#3-tests) - - [3.1 Unit tests](#3.1-unit-tests) - - [3.2 Functional tests](#3.2-functional-tests) + - [2.1 Overview](#21-overview) + - [2.2 FW utility](#22-fw-utility) + - [2.2.1 Command structure](#221-command-structure) + - [2.2.2 Command interface](#222-command-interface) + - [2.2.2.1 Show commands](#2221-show-commands) + - [2.2.2.1.1 Overview](#22211-overview) + - [2.2.2.1.2 Description](#22212-description) + - [2.2.2.2 Install commands](#2222-install-commands) + - [2.2.2.2.1 Overview](#22221-overview) + - [2.2.2.2.2 Description](#22222-description) + - [2.2.2.3 Update commands](#2223-update-commands) + - [2.2.2.3.1 Overview](#22231-overview) + - [2.2.2.3.2 Description](#22232-description) +- [4 Flows](#3-flows) + - [3.1 Show components status](#31-show-components-status) + - [3.2 Install component FW](#32-install-component-fw) + - [3.2.1 Non modular chassis platform](#321-non-modular-chassis-platform) + - [3.2.2 Modular chassis platform](#322-modular-chassis-platform) +- [4 Tests](#4-tests) + - [4.1 Unit tests](#41-unit-tests) ## About this manual @@ -60,49 +65,60 @@ This document provides general information about FW utility implementation in SO | N/A | Not Applicable/Not Available | ## List of figures -[Figure 1: FW utility High Level Design](#figure-1-fw-utility-high-level-design) + +[Figure 1: FW utility High Level Design](#figure-1-fw-utility-high-level-design) +[Figure 2: Show components status flow](#figure-2-show-components-status-flow) +[Figure 3: FW install (non modular) flow](#figure-3-fw-install-non-modular-flow) +[Figure 4: FW install (modular) flow](#figure-4-fw-install-modular-flow) ## List of tables + [Table 1: Event logging](#table-1-event-logging) # 1 Introduction ## 1.1 Feature overview -A modern network switch is a sophisticated equipment which consists of many auxiliary components -which are responsible for managing different subsystems (e.g., PSU/FAN/QSFP/EEPROM/THERMAL) +A modern network switch is a sophisticated equipment which consists of many auxiliary components +which are responsible for managing different subsystems (e.g., PSU/FAN/QSFP/EEPROM/THERMAL) and providing necessary interfaces (e.g., I2C/SPI/JTAG). -Basically these components are complex programmable logic devices with it's own HW architecture +Basically these components are complex programmable logic devices with it's own HW architecture and software. The most important are BIOS/CPLD/FPGA etc. -It is very important to always have the latest recommended software version to improve device -stability, security and performance. Also, software updates can add new features -and remove outdated ones. +It is very important to always have the latest recommended software version to improve device stability, +security and performance. Also, software updates can add new features and remove outdated ones. -In order to make software update as simple as possible and to provide a nice user frindly -interface for various maintenance operations (e.g., install a new FW or query current version) +In order to make software update as simple as possible and to provide a nice user frindly +interface for various maintenance operations (e.g., install a new FW or query current version) we might need a dedicated FW utility. ## 1.2 Requirements -### 1.2.1 Command interface +### 1.2.1 Functionality + +**This feature will support the following functionality:** +1. Manual FW installation for particular platform component +2. Automatic FW installation for all available platform components +3. Querying platform components and FW versions + +### 1.2.2 Command interface **This feature will support the following commands:** 1. show: display FW versions 2. install: manual FW installation 3. update: automatic FW installation -### 1.2.2 Error handling +### 1.2.3 Error handling **This feature will provide error handling for the next situations:** 1. Invalid input 2. Incompatible options/parameters 3. Invalid/nonexistent FW URL/path -**Note:** FW binary validation (checksum, format, etc.) should be done by Low Level Utility +**Note:** FW binary validation (checksum, format, etc.) should be done by SONiC platform API -### 1.2.3 Event logging +### 1.2.4 Event logging **This feature will provide event logging for the next situations:** 1. FW binary downloading over URL: start/end @@ -119,7 +135,7 @@ we might need a dedicated FW utility. | FW binary installation: start/end | INFO | | FW binary installation: error | ERROR | -**Note:** Some extra information also shall be logged: +**Note:** Some extra information also will be logged: 1. Component location (e.g., Chassis1/Module1/BIOS) 2. Operation result (e.g., success/failure) @@ -135,17 +151,17 @@ In order to improve scalability and performance a modern network switches provid 1. Non modular chassis platforms 2. Modular chassis platforms -Non modular chassis platforms may contain one or more chassis. +Non modular chassis platforms may contain one or more chassis. Each chassis may contain it's own set of components. -Modular chassis platforms may contain one or more chassis. -Each chassis may contain one or more modules and it's own set of components. +Modular chassis platforms may contain one or more chassis. +Each chassis may contain one or more modules and it's own set of components. Each module may contain it's own set of components. Basically each chassis/module may contain one or more components (e.g., BIOS/CPLD/FPGA). -SONiC platform API provides an interface for FW maintenance operations for both modular -and non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, +SONiC platform API provides an interface for FW maintenance operations for both modular and +non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, but may have different implementation. SONiC FW utility uses platform API to interact with the various platform components. @@ -163,11 +179,11 @@ fwutil |--- install | |--- chassis | |--- component -| | |--- fw +| | |--- fw -y|--yes | |--- module | |--- component -| |--- fw -|--- update -o|--online -i|--image= +| |--- fw -y|--yes +|--- update -i|--image= -y|--yes ``` **Note:** can be absolute path or URL @@ -180,7 +196,7 @@ fwutil The purpose of the show commands group is to provide an interface for: 1. FW utility related information query (version, etc.) -2. FW version query for various platform components +2. Platform components related information query (fw, etc.) ##### 2.2.2.1.2 Description @@ -193,84 +209,161 @@ fwutil version 1.0.0.0 **The following command displays platform components and FW versions:** ```bash root@sonic:~# fwutil show status -Chassis Module Component Version --------- ------- --------- ------------------ -Chassis1 N/A BIOS 0ACLH003_02.02.007 - CPLD1 2 - CPLD2 5 - CPLD3 1 - FPGA1 5 - FPGA2 8 - FPGA3 4 -Chassis2 Module1 BIOS 0ACLH004_02.02.007 - CPLD1 5 - CPLD2 8 - CPLD3 4 - FPGA1 8 - FPGA2 11 - FPGA3 7 - Module2 BIOS 0ACLH004_02.02.007 - CPLD1 5 - CPLD2 8 - CPLD3 4 - FPGA1 8 - FPGA2 11 - FPGA3 7 +Chassis Module Component Version Description +-------- ------- --------- ------------------ ------------ +Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS + ASIC 29.2000.1886 Chassis ASIC + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA +Chassis2 BIOS 0ACLH004_02.02.007 Chassis BIOS + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA + Module1 ASIC 29.2000.1886 Module ASIC + CPLD 10 Module CPLD + FPGA 10 Module FPGA + Module2 ASIC 29.2000.1886 Module ASIC + CPLD 10 Module CPLD + FPGA 10 Module FPGA ``` #### 2.2.2.2 Install commands ##### 2.2.2.2.1 Overview -The purpose of the install commands group is to provide an interface +The purpose of the install commands group is to provide an interface for manual FW update of various platform components. ##### 2.2.2.2.2 Description **The following command installs FW on non modular chassis platform:** ```bash -root@sonic:~# fwutil install chassis Chassis1 component BIOS fw /home/admin/bios.fw -root@sonic:~# fwutil install chassis Chassis1 component CPLD1 fw /home/admin/cpld1.fw -root@sonic:~# fwutil install chassis Chassis1 component FPGA1 fw /home/admin/fpga1.fw +root@sonic:~# fwutil install chassis Chassis1 component BIOS fw --yes /home/admin/bios.fw +root@sonic:~# fwutil install chassis Chassis1 component CPLD1 fw --yes /home/admin/cpld1.fw +root@sonic:~# fwutil install chassis Chassis1 component FPGA1 fw --yes /home/admin/fpga1.fw ``` **The following command installs FW on modular chassis platform:** ```bash root@sonic:~# fwutil install chassis Chassis1 module Module1 component BIOS fw /home/admin/bios.fw +New FW will be installed, continue? [y/n]: n +Aborted! root@sonic:~# fwutil install chassis Chassis1 module Module1 component CPLD1 fw /home/admin/cpld1.fw +New FW will be installed, continue? [y/n]: n +Aborted! root@sonic:~# fwutil install chassis Chassis1 module Module1 component FPGA1 fw /home/admin/fpga1.fw +New FW will be installed, continue? [y/n]: n +Aborted! ``` +**Supported options:** +1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively + #### 2.2.2.3 Update commands ##### 2.2.2.3.1 Overview -The purpose of the update commands group is to provide an interface +The purpose of the update commands group is to provide an interface for automatic FW update of all available platform components. -Different FW sources shall be supported: -1. online - from internet -2. image - from current/next SONiC image +Automatic FW update requires platform_components.json to be created and placed at: +_sonic-buildimage/device///platform_components.json_ + +**Example:** +```json +{ + "chassis": { + "Chassis1": { + "component": { + "BIOS": { + "fw": "/etc//fw/chassis1/bios/bios.bin" + }, + "CPLD": { + "fw": "/etc//fw/chassis1/cpld/cpld.bin" + }, + "FPGA": { + "fw": "/etc//fw/chassis1/fpga/fpga.bin" + } + }, + "module": { + "Module1": { + "component": { + "ASIC": { + "fw": "/etc//fw/chassis1/module1/asic/asic.bin" + }, + "CPLD": { + "fw": "/etc//fw/chassis1/module1/cpld/cpld.bin" + }, + "FPGA": { + "fw": "/etc//fw/chassis1/module1/fpga/fpga.bin" + } + } + } + } + } + } +} +``` + +**Note:** FW update will be skipped if path is not specified (e.g., 'fw': "") ##### 2.2.2.3.2 Description -__The following command updates FW of all available platform components:__ +**The following command updates FW of all available platform components:** ```bash -root@sonic:~# fwutil update --online root@sonic:~# fwutil update --image=next +Chassis Module Component Image +-------- ------- --------- ------------ +Chassis1 N/A BIOS /etc//fw/chassis1/bios/bios.bin + ASIC /etc//fw/chassis1/asic/asic.bin + CPLD /etc//fw/chassis1/cpld/cpld.bin + FPGA /etc//fw/chassis1/fpga/fpga.bin +Chassis2 BIOS /etc//fw/chassis2/bios/bios.bin + CPLD /etc//fw/chassis2/cpld/cpld.bin + FPGA /etc//fw/chassis2/fpga/fpga.bin + Module1 ASIC /etc//fw/chassis2/module1/asic/asic.bin + CPLD /etc//fw/chassis2/module1/cpld/cpld.bin + FPGA /etc//fw/chassis2/module1/fpga/fpga.bin + Module2 ASIC /etc//fw/chassis2/module2/asic/asic.bin + CPLD /etc//fw/chassis2/module2/cpld/cpld.bin + FPGA /etc//fw/chassis2/module2/fpga/fpga.bin +New FW will be installed, continue? [y/n]: n +Aborted! ``` +**Supported options:** +1. -i|--image - update FW using current/next SONiC image +2. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively + **Note:** the default option is _--image=current_ -# 3 Tests +# 3 Flows -## 3.1 Unit tests +## 3.1 Show components status -1. Show FW utility version -2. Show components status +![Show components status flow](images/show_status_flow.svg "Figure 2: Show components status flow") + +###### Figure 2: Show components status flow -## 3.2 Functional tests +## 3.2 Install component FW -1. Install new BIOS/CPLD/FPGA FW on non modular chassis -2. Install new BIOS/CPLD/FPGA FW on modular chassis -3. Update FW on all available chassis components +### 3.2.1 Non modular chassis platform + +![FW install (non modular) flow](images/install_non_modular_flow.svg "Figure 3: FW install (non modular) flow") + +###### Figure 3: FW install (non modular) flow + +### 3.2.2 Modular chassis platform + +![FW install (modular) flow](images/install_modular_flow.svg "Figure 4: FW install (modular) flow") + +###### Figure 4: FW install (modular) flow + +# 4 Tests + +## 4.1 Unit tests + +1. Show FW utility version +2. Show components status +3. Install new BIOS/CPLD/FPGA FW on non modular chassis +4. Install new BIOS/CPLD/FPGA FW on modular chassis +5. Update FW on all available chassis components diff --git a/doc/fwutil/images/fwutil_hld.svg b/doc/fwutil/images/fwutil_hld.svg index ef3776d958b..6f26ebecdcd 100755 --- a/doc/fwutil/images/fwutil_hld.svg +++ b/doc/fwutil/images/fwutil_hld.svg @@ -1,10 +1,10 @@ - + - FWUTIL HLD + xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="35.2012in" height="26.5398in" + viewBox="0 0 2534.49 1910.87" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"> + fwutil hld @@ -20,38 +20,38 @@ .st4 {fill:#70ad47;stroke:#000000;stroke-width:2} .st5 {fill:#feffff;font-family:Calibri;font-size:3em} .st6 {fill:#ed7d31;stroke:#000000;stroke-opacity:0.95;stroke-width:2} - .st7 {fill:#70ad47;stroke:#30518f;stroke-width:0.75} + .st7 {fill:#7f7f7f;stroke:#000000;stroke-width:2} .st8 {fill:#feffff;font-family:Calibri;font-size:4.00001em} - .st9 {fill:#7f7f7f;stroke:#000000;stroke-width:2} + .st9 {fill:#70ad47;stroke:#30518f;stroke-width:0.75} .st10 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> - + - Page-1 + Page-6 - + Rectangle - + - - Rectangle.19 + + Rectangle.2 chassis_base.py - - - chassis_base.py - + + + chassis_base.py + Rounded Rectangle.5 FW API @@ -67,50 +67,69 @@ - - - - + + + + - - - FW API - - Rectangle.15 + + + FW API + + Rectangle.9 get_component_name_list - - - get_component_name_list - + + + get_component_name_list + Rectangle.5 get_firmware_version - - - get_firmware_version - + + + get_firmware_version + Rectangle.6 install_component_firmware - - - install_component_firmware - - Rounded Rectangle.25 - MODULE API + + + install_component_firmware + + Rectangle.95 + HW + + + + + + + HW + + Simple Double Arrow.97 + + + + + + + + Rounded Rectangle.14 + DEVICE API @@ -124,83 +143,70 @@ - - - - + + + + - - - MODULE API - - Rectangle.8 - get_num_modules + + + DEVICE API + + Rectangle.15 + get_name - - - get_num_modules - - Rectangle.9 - get_all_modules + + + get_name + + Rectangle.44 + get_presence - - - get_all_modules - - Rectangle.10 - get_module + + + get_presence + + Rectangle.45 + get_model - - - get_module - - Rectangle.31 - - - - - - - Simple Double Arrow - - - - - - - - Rectangle.55 - FW Utility + + + get_model + + Rectangle.49 + get_serial - - - FW Utility - - Rectangle.63 + + + get_serial + + Rectangle.50 + get_status - - - - Rounded Rectangle - DEVICE API + + + + get_status + + Rounded Rectangle.72 + MODULE API @@ -214,66 +220,66 @@ - - - - + + + + - - - DEVICE API - - Rectangle.67 - get_name + + + MODULE API + + Rectangle.73 + get_num_modules - - - get_name - - Rectangle.68 - get_presence + + + get_num_modules + + Rectangle.74 + get_all_modules - - - get_presence - - Simple Double Arrow.72 + + + get_all_modules + + Rectangle.75 + get_module - - - - - Simple Double Arrow.74 + + + + get_module + + Rectangle.78 - - + - - Simple Double Arrow.75 + + Rectangle.79 + module_base.py - - - - - Rounded Rectangle.82 + + + + module_base.py + + Rounded Rectangle.80 FW API @@ -288,143 +294,223 @@ - - - - + + + + - - - FW API - - Rectangle.83 + + + FW API + + Rectangle.81 get_component_name_list - - - get_component_name_list - - Rectangle.84 + + + get_component_name_list + + Rectangle.82 get_firmware_version - - - get_firmware_version - - Rectangle.85 + + + get_firmware_version + + Rectangle.83 install_component_firmware - - - install_component_firmware - + + + install_component_firmware + + Rounded Rectangle.84 + DEVICE API + + + + + + + + + + + + + + + + + + + + + + DEVICE API + + Rectangle.85 + get_name + + + + + + + get_name + Rectangle.86 - module_base.py + get_presence - - - module_base.py - - Rectangle.88 + + + get_presence + + Rectangle.87 get_model - - - get_model - - Rectangle.89 + + + get_model + + Rectangle.88 get_serial - - - get_serial - - Rectangle.90 + + + get_serial + + Rectangle.89 get_status - - - get_status - - Rectangle.91 - device_base.py + + + get_status + + Simple Double Arrow.103 + - - - - device_base.py - - Rectangle.92 - Low Level Utility + + + + Simple Double Arrow.104 + + + + + + + + Rectangle.105 + FW Utility - - - Low Level Utility - - Simple Double Arrow.93 + + + FW Utility + + Simple Double Arrow.106 - + - - Simple Double Arrow.94 + + Rectangle.39 - - + - - Rectangle.95 - HW + + Rectangle.40 + platform_base.py - - - HW - - Simple Double Arrow.97 + + + platform_base.py + + Rounded Rectangle.52 + CHASSIS API + + + + + + + + + + + + + + + + + + + + + + CHASSIS API + + Rectangle.53 + get_chassis + + + + + + + get_chassis + + Simple Double Arrow.62 - + diff --git a/doc/fwutil/images/install_modular_flow.svg b/doc/fwutil/images/install_modular_flow.svg new file mode 100755 index 00000000000..0b3565dc98b --- /dev/null +++ b/doc/fwutil/images/install_modular_flow.svg @@ -0,0 +1,777 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-4 + + + + + + + + + + + Actor lifeline.115 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.120 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform : PlatformBase<Object> + + + + + + + + + Object lifeline.125 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis : ChassisBase<DeviceBase> + + + Activation.131 + + + + + + + + Message.133 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.134 + return <chassis> + + + + + + + + + + + + return <chassis> + + + + + + + + Object lifeline.138 + module : ModuleBase<DeviceBase> + + Sheet.20 + + + + Sheet.21 + + + + Sheet.22 + + + Sheet.23 + + + + + + + module : ModuleBase<DeviceBase> + + + Message.162 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.164 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.168 + + + + + + + + Activation.169 + + + + + + + + Activation.170 + + + + + + + + Activation.255 + + + + + + + + Activation.256 + + + + + + + + Message.257 + <chassis>.get_all_modules() + + + + + + + + + + + + <chassis>.get_all_modules() + + Return Message.258 + return <module_list> + + + + + + + + + + + + return <module_list> + + + + + + Optional fragment.737 + + + + + Sheet.34 + opt + + + + + + + + + + + + + + + opt + + Sheet.35 + [ if <chassis_name> is found ] + + + + + + [ if <chassis_name> is found ] + + + + + + + Loop fragment.946 + + + + + Sheet.37 + loop + + + + + + + + + + + + + + + loop + + Sheet.38 + [ for module in <module_list> ] + + + + + + [ for module in <module_list> ] + + + Message.952 + <module>.get_name() + + + + + + + + + + + + <module>.get_name() + + Return Message.953 + return <module_name> + + + + + + + + + + + + return <module_name> + + Activation.954 + + + + + + + + Activation.955 + + + + + + + + + + + + Optional fragment.956 + + + + + Sheet.44 + opt + + + + + + + + + + + + + + + opt + + Sheet.45 + [ if <module_name> is found ] + + + + + + [ if <module_name> is found ] + + + Activation.961 + + + + + + + + Activation.962 + + + + + + + + Message.963 + <module>.get_component_name_list() + + + + + + + + + + + + <module>.get_component_name_list() + + Return Message.964 + return <component_name_list> + + + + + + + + + + + + return <component_name_list> + + + + + + Optional fragment.965 + + + + + Sheet.51 + opt + + + + + + + + + + + + + + + opt + + Sheet.52 + [ if <component_name> not in <component_name_list> or <image_... + + + + + + [ if <component_name> not in <component_name_list> or <image_path> not exists ] ] + + + Activation.968 + + + + + + + + Self Message.969 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.970 + + + + + + + + Message.971 + <module>.install_component_firmware(<component_name>,<image_p... + + + + + + + + + + + + <module>.install_component_firmware(<component_name>,<image_path>) + + Activation.972 + + + + + + + + Return Message.973 + return <result> + + + + + + + + + + + + return <result> + + Activation.974 + + + + + + + + Self Message.975 + show_result(<chassis_name>,<module_name>,<component_name>,<im... + + + + + + + + + + + + show_result(<chassis_name>,<module_name>,<component_name>,<image_path>,<result>) + + + + + + Optional fragment.980 + + + + + Sheet.62 + opt + + + + + + + + + + + + + + + opt + + Sheet.63 + [ if <chassis_name> is not found ] + + + + + + [ if <chassis_name> is not found ] + + + Activation.983 + + + + + + + + Self Message.984 + handle_error() + + + + + + + + + + + + handle_error() + + + + + + Optional fragment.985 + + + + + Sheet.67 + opt + + + + + + + + + + + + + + + opt + + Sheet.68 + [ if <module_name> is not found ] + + + + + + [ if <module_name> is not found ] + + + Activation.988 + + + + + + + + Self Message.989 + handle_error() + + + + + + + + + + + + handle_error() + + diff --git a/doc/fwutil/images/install_non_modular_flow.svg b/doc/fwutil/images/install_non_modular_flow.svg new file mode 100755 index 00000000000..172e35e6066 --- /dev/null +++ b/doc/fwutil/images/install_non_modular_flow.svg @@ -0,0 +1,521 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-4 + + + + + + + + + + + Actor lifeline.474 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.479 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform : PlatformBase<Object> + + + + + + + + + Object lifeline.484 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis : ChassisBase<DeviceBase> + + + Activation.489 + + + + + + + + Message.490 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.491 + return <chassis> + + + + + + + + + + + + return <chassis> + + Message.508 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.509 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.510 + + + + + + + + Activation.511 + + + + + + + + Activation.512 + + + + + + + + + + + + Optional fragment.541 + + + + + Sheet.25 + opt + + + + + + + + + + + + + + + opt + + Sheet.26 + [ if <chassis_name> is found ] + + + + + + [ if <chassis_name> is found ] + + + Activation.928 + + + + + + + + Activation.929 + + + + + + + + Message.930 + <chassis>.get_component_name_list() + + + + + + + + + + + + <chassis>.get_component_name_list() + + Return Message.931 + return <component_name_list> + + + + + + + + + + + + return <component_name_list> + + + + + + Optional fragment.932 + + + + + Sheet.32 + opt + + + + + + + + + + + + + + + opt + + Sheet.33 + [ if <component_name> not in <component_name_list> or <image_... + + + + + + [ if <component_name> not in <component_name_list> or <image_path> not exists ] ] + + + Activation.935 + + + + + + + + Self Message.936 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.937 + + + + + + + + Message.938 + <chassis>.install_component_firmware(<component_name>,<image_... + + + + + + + + + + + + <chassis>.install_component_firmware(<component_name>,<image_path>) + + Activation.939 + + + + + + + + Return Message.940 + return <result> + + + + + + + + + + + + return <result> + + + + + + Optional fragment.990 + + + + + Sheet.41 + opt + + + + + + + + + + + + + + + opt + + Sheet.42 + [ if <chassis_name> is not found ] + + + + + + [ if <chassis_name> is not found ] + + + Activation.993 + + + + + + + + Self Message.994 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.995 + + + + + + + + Self Message.996 + show_result(<chassis_name>,<component_name>,<image_path>,<res... + + + + + + + + + + + + show_result(<chassis_name>,<component_name>,<image_path>,<result>) + + diff --git a/doc/fwutil/images/show_status_flow.svg b/doc/fwutil/images/show_status_flow.svg new file mode 100755 index 00000000000..0ed6c7cb31a --- /dev/null +++ b/doc/fwutil/images/show_status_flow.svg @@ -0,0 +1,739 @@ + + + + + fwutil flows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-5 + + + + + + + + + + + Actor lifeline.764 + FW Utility + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + FW Utility + + + + + + + + + Object lifeline.769 + platform : PlatformBase<Object> + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + platform : PlatformBase<Object> + + + + + + + + + Object lifeline.774 + chassis : ChassisBase<DeviceBase> + + Sheet.12 + + + + Sheet.13 + + + + Sheet.14 + + + Sheet.15 + + + + + + + chassis : ChassisBase<DeviceBase> + + + Activation.779 + + + + + + + + Message.780 + <platform>.get_chassis() + + + + + + + + + + + + <platform>.get_chassis() + + Return Message.781 + return <chassis> + + + + + + + + + + + + return <chassis> + + + + + + + + Object lifeline.782 + module : ModuleBase<DeviceBase> + + Sheet.20 + + + + Sheet.21 + + + + Sheet.22 + + + Sheet.23 + + + + + + + module : ModuleBase<DeviceBase> + + + Activation.795 + + + + + + + + Message.845 + <chassis>.get_name() + + + + + + + + + + + + <chassis>.get_name() + + Return Message.846 + return <chassis_name> + + + + + + + + + + + + return <chassis_name> + + Activation.847 + + + + + + + + Activation.848 + + + + + + + + + + + + Loop fragment.851 + + + + + Sheet.30 + loop + + + + + + + + + + + + + + + loop + + Sheet.31 + [ for module in <module_list> ] + + + + + + [ for module in <module_list> ] + + + Message.856 + <module>.get_name() + + + + + + + + + + + + <module>.get_name() + + Return Message.857 + return <module_name> + + + + + + + + + + + + return <module_name> + + Activation.858 + + + + + + + + Activation.859 + + + + + + + + Activation.863 + + + + + + + + Activation.864 + + + + + + + + Message.865 + <module>.get_component_name_list() + + + + + + + + + + + + <module>.get_component_name_list() + + Return Message.866 + return <component_name_list> + + + + + + + + + + + + return <component_name_list> + + Activation.868 + + + + + + + + Self Message.869 + show_status(<chassis_component_map>,<module_component_map>) + + + + + + + + + + + + show_status(<chassis_component_map>,<module_component_map>) + + Activation.872 + + + + + + + + Activation.873 + + + + + + + + Message.874 + <chassis>.get_component_name_list() + + + + + + + + + + + + <chassis>.get_component_name_list() + + Return Message.875 + return <component_name_list> + + + + + + + + + + + + return <component_name_list> + + + + + + Loop fragment.877 + + + + + Sheet.47 + loop + + + + + + + + + + + + + + + loop + + Sheet.48 + [ for component_name in <component_name_list> ] + + + + + + [ for component_name in <component_name_list> ] + + + Activation.884 + + + + + + + + Self Message.885 + chassis_component_map[<chassis_name>][<component_name>] = <fi... + + + + + + + + + + + + chassis_component_map[<chassis_name>][<component_name>] = <firmware_version> + + Message.889 + <chassis>.get_firmware_version(<component_name>) + + + + + + + + + + + + <chassis>.get_firmware_version(<component_name>) + + Return Message.890 + return <firmware_version> + + + + + + + + + + + + return <firmware_version> + + Activation.891 + + + + + + + + Activation.892 + + + + + + + + Activation.898 + + + + + + + + Activation.899 + + + + + + + + Message.900 + <chassis>.get_all_modules() + + + + + + + + + + + + <chassis>.get_all_modules() + + Return Message.901 + return <module_list> + + + + + + + + + + + + return <module_list> + + + + + + Loop fragment.902 + + + + + Sheet.60 + loop + + + + + + + + + + + + + + + loop + + Sheet.61 + [ for component_name in <component_name_list> ] + + + + + + [ for component_name in <component_name_list> ] + + + Activation.905 + + + + + + + + Self Message.906 + module_component_map[<chassis_name>][<module_name>][<componen... + + + + + + + + + + + + module_component_map[<chassis_name>][<module_name>][<component_name>] = <firmware_version> + + Message.907 + <module>.get_firmware_version(<component_name>) + + + + + + + + + + + + <module>.get_firmware_version(<component_name>) + + Return Message.908 + return <firmware_version> + + + + + + + + + + + + return <firmware_version> + + Activation.909 + + + + + + + + Activation.910 + + + + + + + + From 74f89a8698f75f705d1ed5ea734ef8053523f311 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Wed, 11 Sep 2019 08:05:11 +0000 Subject: [PATCH 3/5] Updated fwutil HLD: rev 0.3. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 180 ++++++++++++++++++++++++++++++------------- 1 file changed, 125 insertions(+), 55 deletions(-) mode change 100644 => 100755 doc/fwutil/fwutil.md diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md old mode 100644 new mode 100755 index 5cad2383808..9b5b24af7ee --- a/doc/fwutil/fwutil.md +++ b/doc/fwutil/fwutil.md @@ -151,14 +151,14 @@ In order to improve scalability and performance a modern network switches provid 1. Non modular chassis platforms 2. Modular chassis platforms -Non modular chassis platforms may contain one or more chassis. -Each chassis may contain it's own set of components. +Non modular chassis platforms may contain only one chassis. +A chassis may contain it's own set of components. -Modular chassis platforms may contain one or more chassis. -Each chassis may contain one or more modules and it's own set of components. +Modular chassis platforms may contain only one chassis. +A chassis may contain one or more modules and it's own set of components. Each module may contain it's own set of components. -Basically each chassis/module may contain one or more components (e.g., BIOS/CPLD/FPGA). +Basically each chassis/module may contain one or more components (e.g., BIOS/ASIC/CPLD/FPGA). SONiC platform API provides an interface for FW maintenance operations for both modular and non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, @@ -183,7 +183,7 @@ fwutil | |--- module | |--- component | |--- fw -y|--yes -|--- update -i|--image= -y|--yes +|--- update -y|--yes -f|--force -i|--image= ``` **Note:** can be absolute path or URL @@ -207,23 +207,27 @@ fwutil version 1.0.0.0 ``` **The following command displays platform components and FW versions:** +1. Non modular chassis platform ```bash root@sonic:~# fwutil show status -Chassis Module Component Version Description --------- ------- --------- ------------------ ------------ -Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS - ASIC 29.2000.1886 Chassis ASIC - CPLD 5 Chassis CPLD - FPGA 5 Chassis FPGA -Chassis2 BIOS 0ACLH004_02.02.007 Chassis BIOS - CPLD 5 Chassis CPLD - FPGA 5 Chassis FPGA - Module1 ASIC 29.2000.1886 Module ASIC - CPLD 10 Module CPLD - FPGA 10 Module FPGA - Module2 ASIC 29.2000.1886 Module ASIC - CPLD 10 Module CPLD - FPGA 10 Module FPGA +Chassis Module Component Version Description +-------- ------- ---------- -------- ------------ +Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA +``` + +2. Modular chassis platform +```bash +root@sonic:~# fwutil show status +Chassis Module Component Version Description +-------- ------- ---------- -------- ------------ +Chassis1 BIOS 0ACLH004_02.02.007 Chassis BIOS + CPLD 5 Chassis CPLD + FPGA 5 Chassis FPGA + Module1 ASIC 29.2000.1886 Module ASIC + CPLD 5 Module CPLD + FPGA 5 Module FPGA ``` #### 2.2.2.2 Install commands @@ -235,22 +239,44 @@ for manual FW update of various platform components. ##### 2.2.2.2.2 Description -**The following command installs FW on non modular chassis platform:** +**The following command installs FW:** +1. Non modular chassis platform ```bash -root@sonic:~# fwutil install chassis Chassis1 component BIOS fw --yes /home/admin/bios.fw -root@sonic:~# fwutil install chassis Chassis1 component CPLD1 fw --yes /home/admin/cpld1.fw -root@sonic:~# fwutil install chassis Chassis1 component FPGA1 fw --yes /home/admin/fpga1.fw +root@sonic:~# fwutil install chassis Chassis1 component BIOS fw --yes /bios.bin +... +FW update in progress ... +... +Warning: Cold reboot is required! +root@sonic:~# fwutil install chassis Chassis1 component CPLD fw --yes /cpld.bin +... +FW update in progress ... +... +Warning: Power cycle is required! +root@sonic:~# fwutil install chassis Chassis1 component FPGA fw --yes /fpga.bin +... +FW update in progress ... +... +Warning: Power cycle is required! ``` -**The following command installs FW on modular chassis platform:** +2. Modular chassis platform ```bash -root@sonic:~# fwutil install chassis Chassis1 module Module1 component BIOS fw /home/admin/bios.fw +root@sonic:~# fwutil install chassis Chassis1 component BIOS fw /bios.bin New FW will be installed, continue? [y/n]: n Aborted! -root@sonic:~# fwutil install chassis Chassis1 module Module1 component CPLD1 fw /home/admin/cpld1.fw +root@sonic:~# fwutil install chassis Chassis1 component CPLD fw /cpld.bin New FW will be installed, continue? [y/n]: n Aborted! -root@sonic:~# fwutil install chassis Chassis1 module Module1 component FPGA1 fw /home/admin/fpga1.fw +root@sonic:~# fwutil install chassis Chassis1 component FPGA fw /fpga.bin +New FW will be installed, continue? [y/n]: n +Aborted! +root@sonic:~# fwutil install chassis Chassis1 module Module1 component ASIC fw /asic.bin +New FW will be installed, continue? [y/n]: n +Aborted! +root@sonic:~# fwutil install chassis Chassis1 module Module1 component CPLD fw /cpld.bin +New FW will be installed, continue? [y/n]: n +Aborted! +root@sonic:~# fwutil install chassis Chassis1 module Module1 component FPGA fw /fpga.bin New FW will be installed, continue? [y/n]: n Aborted! ``` @@ -275,26 +301,38 @@ _sonic-buildimage/device///platform_components.jso "Chassis1": { "component": { "BIOS": { - "fw": "/etc//fw/chassis1/bios/bios.bin" + "image": "/etc//fw/chassis1/bios/bios.bin", + "firmware": "0ACLH003_02.02.010", + "info": "Cold reboot is required" }, "CPLD": { - "fw": "/etc//fw/chassis1/cpld/cpld.bin" + "image": "/etc//fw/chassis1/cpld/cpld.bin", + "firmware": "10", + "info": "Power cycle is required" }, "FPGA": { - "fw": "/etc//fw/chassis1/fpga/fpga.bin" + "image": "/etc//fw/chassis1/fpga/fpga.bin", + "firmware": "5", + "info": "Power cycle is required" } }, "module": { "Module1": { "component": { "ASIC": { - "fw": "/etc//fw/chassis1/module1/asic/asic.bin" + "image": "/etc//fw/chassis1/module1/asic/asic.bin", + "firmware": "29.2000.1894", + "info": "Cold reboot is required" }, "CPLD": { - "fw": "/etc//fw/chassis1/module1/cpld/cpld.bin" + "image": "/etc//fw/chassis1/module1/cpld/cpld.bin", + "firmware": "10", + "info": "Power cycle is required" }, "FPGA": { - "fw": "/etc//fw/chassis1/module1/fpga/fpga.bin" + "image": "/etc//fw/chassis1/module1/fpga/fpga.bin", + "firmware": "5", + "info": "Power cycle is required" } } } @@ -304,35 +342,67 @@ _sonic-buildimage/device///platform_components.jso } ``` -**Note:** FW update will be skipped if path is not specified (e.g., 'fw': "") +**Note:** FW update will be skipped if path is not specified (e.g., 'image': "") ##### 2.2.2.3.2 Description **The following command updates FW of all available platform components:** +1. Non modular chassis platform ```bash root@sonic:~# fwutil update --image=next -Chassis Module Component Image --------- ------- --------- ------------ -Chassis1 N/A BIOS /etc//fw/chassis1/bios/bios.bin - ASIC /etc//fw/chassis1/asic/asic.bin - CPLD /etc//fw/chassis1/cpld/cpld.bin - FPGA /etc//fw/chassis1/fpga/fpga.bin -Chassis2 BIOS /etc//fw/chassis2/bios/bios.bin - CPLD /etc//fw/chassis2/cpld/cpld.bin - FPGA /etc//fw/chassis2/fpga/fpga.bin - Module1 ASIC /etc//fw/chassis2/module1/asic/asic.bin - CPLD /etc//fw/chassis2/module1/cpld/cpld.bin - FPGA /etc//fw/chassis2/module1/fpga/fpga.bin - Module2 ASIC /etc//fw/chassis2/module2/asic/asic.bin - CPLD /etc//fw/chassis2/module2/cpld/cpld.bin - FPGA /etc//fw/chassis2/module2/fpga/fpga.bin -New FW will be installed, continue? [y/n]: n -Aborted! +Chassis Module Component Version Image Firmware Status Info +-------- ------- ---------- -------- ------ --------- ------- ----- +Chassis1 N/A BIOS 0ACLH004_02.02.007 /bios.bin 0ACLH004_02.02.010 pending update Cold reboot is required + CPLD 5 /cpld.bin 10 pending update Power cycle is required + FPGA 5 /fpga.bin 5 up to date Power cycle is required +New FW will be installed, continue? [y/n]: y + +... +FW update in progress ... +... + +Summary: + +Chassis Module Component Status +-------- ------- ---------- ------- +Chassis1 N/A BIOS update successful + CPLD update failed + FPGA up to date +``` + +2. Modular chassis platform +```bash +root@sonic:~# fwutil update --image=next +Chassis Module Component Version Image Firmware Status Info +-------- ------- ---------- -------- ------ --------- ------- ----- +Chassis1 BIOS 0ACLH004_02.02.007 /bios.bin 0ACLH004_02.02.010 pending update Cold reboot is required + CPLD 5 /cpld.bin 10 pending update Power cycle is required + FPGA 5 /fpga.bin 5 up to date Power cycle is required + Module1 ASIC 29.2000.1886 /asic.bin 29.2000.1894 pending update Cold reboot is required + CPLD 5 /cpld.bin 10 pending update Power cycle is required + FPGA 5 /fpga.bin 5 up to date Power cycle is required +New FW will be installed, continue? [y/n]: y + +... +FW update in progress ... +... + +Summary: + +Chassis Module Component Status +-------- ------- ---------- ------- +Chassis1 BIOS update successful + CPLD update successful + FPGA up to date + Module1 ASIC update successful + CPLD update failed + FPGA up to date ``` **Supported options:** -1. -i|--image - update FW using current/next SONiC image -2. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively +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_ From 30cc203967c945c6fbb6a356ebe2878f39cb9c92 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Tue, 17 Sep 2019 14:31:23 +0000 Subject: [PATCH 4/5] Updated fwutil HLD: rev 0.4. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 8 +- doc/fwutil/images/fwutil_hld.svg | 637 ++++++++------- doc/fwutil/images/install_modular_flow.svg | 682 ++++++++++------ .../images/install_non_modular_flow.svg | 564 +++++++++---- doc/fwutil/images/show_status_flow.svg | 759 ++++++++++++------ 5 files changed, 1682 insertions(+), 968 deletions(-) diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md index 9b5b24af7ee..15ac47a50dd 100755 --- a/doc/fwutil/fwutil.md +++ b/doc/fwutil/fwutil.md @@ -41,9 +41,11 @@ This document provides general information about FW utility implementation in SO ## Revision -| Rev | Date | Author | Description | -|:---:|:----------:|:--------------:|:----------------| -| 0.1 | 21/08/2019 | Nazarii Hnydyn | Initial version | +| Rev | Date | Author | Description | +|:---:|:----------:|:--------------:|:----------------------------------| +| 0.1 | 21/08/2019 | Nazarii Hnydyn | Initial version | +| 0.2 | 10/09/2019 | Nazarii Hnydyn | Review feedback and other changes | +| 0.3 | 17/09/2019 | Nazarii Hnydyn | Align flows with the platform API | ## Abbreviations diff --git a/doc/fwutil/images/fwutil_hld.svg b/doc/fwutil/images/fwutil_hld.svg index 6f26ebecdcd..79483005043 100755 --- a/doc/fwutil/images/fwutil_hld.svg +++ b/doc/fwutil/images/fwutil_hld.svg @@ -1,9 +1,9 @@ - + + xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="35.2012in" height="36.3823in" + viewBox="0 0 2534.49 2619.53" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"> fwutil hld @@ -15,45 +15,35 @@ - + - Page-6 + Page-11 - + Rectangle - + - - Rectangle.2 - chassis_base.py - - - - - - - chassis_base.py - - Rounded Rectangle.5 - FW API + + Rounded Rectangle.42 + DEVICE API @@ -67,68 +57,149 @@ - - - - + + + + - - - FW API - - Rectangle.9 - get_component_name_list + + + DEVICE API + + Rectangle.43 + get_name + + + + + + + get_name + + Rectangle.4 + get_presence - - - get_component_name_list - + + + get_presence + Rectangle.5 - get_firmware_version + get_model - - - get_firmware_version - - Rectangle.6 - install_component_firmware + + + get_model + + Rectangle.49 + get_serial - - - install_component_firmware - - Rectangle.95 - HW + + + get_serial + + Rectangle.50 + get_status + + + + + + + get_status + + Rectangle.105 + FW Utility - - - HW - - Simple Double Arrow.97 + + + FW Utility + + Simple Double Arrow.106 - + - - Rounded Rectangle.14 + + Rectangle.10 + + + + + + + Rectangle.11 + platform_base.py + + + + + + + platform_base.py + + Rounded Rectangle.52 + CHASSIS API + + + + + + + + + + + + + + + + + + + + + + CHASSIS API + + Rectangle.53 + get_chassis + + + + + + + get_chassis + + Rectangle.64 + + + + + + + Rounded Rectangle.70 DEVICE API @@ -149,64 +220,74 @@ - - - DEVICE API - - Rectangle.15 + + + DEVICE API + + Rectangle.71 get_name - - - get_name - - Rectangle.44 + + + get_name + + Rectangle.72 get_presence - - - get_presence - - Rectangle.45 + + + get_presence + + Rectangle.73 get_model - - - get_model - - Rectangle.49 + + + get_model + + Rectangle.74 get_serial - - - get_serial - - Rectangle.50 + + + get_serial + + Rectangle.75 get_status - - - get_status - - Rounded Rectangle.72 - MODULE API + + + get_status + + Rectangle.113 + chassis_base.py + + + + + + + chassis_base.py + + Rounded Rectangle.123 + COMPONENT API @@ -226,61 +307,51 @@ - - - MODULE API - - Rectangle.73 - get_num_modules + + + COMPONENT API + + Rectangle.124 + get_num_components - - - get_num_modules - - Rectangle.74 - get_all_modules + + + get_num_components + + Rectangle.125 + get_all_component - - - get_all_modules - - Rectangle.75 - get_module + + + get_all_component + + Rectangle.126 + get_component - - - get_module - - Rectangle.78 + + + get_component + + Rectangle.127 - + - - Rectangle.79 - module_base.py - - - - - - - module_base.py - - Rounded Rectangle.80 - FW API + + Rounded Rectangle.128 + API @@ -300,175 +371,176 @@ - - - FW API - - Rectangle.81 - get_component_name_list + + + API + + Rectangle.129 + get_name - - - get_component_name_list - - Rectangle.82 - get_firmware_version + + + get_name + + Rectangle.130 + get_description - - - get_firmware_version - - Rectangle.83 - install_component_firmware + + + get_description + + Rectangle.131 + get_firmware_version - - - install_component_firmware - - Rounded Rectangle.84 - DEVICE API - - - - - - - - - - - - - - - - - - - - - - DEVICE API - - Rectangle.85 - get_name + + + get_firmware_version + + Rectangle.132 + component_base.py - - - get_name - - Rectangle.86 - get_presence + + + component_base.py + + Rectangle.134 + HW - - - get_presence - - Rectangle.87 - get_model + + + HW + + Simple Double Arrow.138 + - - - - get_model - - Rectangle.88 - get_serial + + + + Simple Double Arrow.139 + - - - - get_serial - - Rectangle.89 - get_status + + + + Rectangle.143 + install_firmware - - - get_status - - Simple Double Arrow.103 + + + install_firmware + + Simple Double Arrow.154 - + - - Simple Double Arrow.104 + + Rounded Rectangle.155 + COMPONENT API + + + + + + + + + + + + + + + + + + + + + + COMPONENT API + + Rectangle.156 + get_num_components - - - - - Rectangle.105 - FW Utility + + + + get_num_components + + Rectangle.157 + get_all_component - - - FW Utility - - Simple Double Arrow.106 + + + get_all_component + + Rectangle.158 + get_component - - - - - Rectangle.39 + + + + get_component + + Simple Double Arrow.160 + - + - - Rectangle.40 - platform_base.py + + Simple Double Arrow.161 + - - - - platform_base.py - - Rounded Rectangle.52 - CHASSIS API + + + + Rounded Rectangle.72 + MODULE API @@ -488,29 +560,50 @@ - - - CHASSIS API - - Rectangle.53 - get_chassis + + + MODULE API + + Rectangle.16 + get_num_modules - - - get_chassis - - Simple Double Arrow.62 + + + get_num_modules + + Rectangle.17 + get_all_modules - - - + + + + get_all_modules + + Rectangle.18 + get_module + + + + + + + get_module + + Rectangle.65 + module_base.py + + + + + + + module_base.py diff --git a/doc/fwutil/images/install_modular_flow.svg b/doc/fwutil/images/install_modular_flow.svg index 0b3565dc98b..0ac6d3f780b 100755 --- a/doc/fwutil/images/install_modular_flow.svg +++ b/doc/fwutil/images/install_modular_flow.svg @@ -2,8 +2,8 @@ + xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="14.0966in" height="20.2749in" + viewBox="0 0 1014.95 1459.8" xml:space="preserve" color-interpolation-filters="sRGB" class="st18"> fwutil flows @@ -16,20 +16,21 @@ .st1 {fill:#5b9bd5;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st2 {stroke:#000000;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st3 {fill:#ffffff;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st4 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st5 {marker-end:url(#mrkr4-47);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st6 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} - .st7 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} - .st8 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st9 {marker-end:url(#mrkr3-55);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st10 {fill:#ffffff;stroke:none;stroke-linecap:butt} + .st4 {font-size:1em} + .st5 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st6 {marker-end:url(#mrkr4-49);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st7 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} + .st8 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} + .st9 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st10 {marker-end:url(#mrkr3-57);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st11 {fill:#b43500;fill-opacity:0;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st12 {fill:#ffffff;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st13 {fill:#b43500;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} .st14 {fill:#ac770d;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st15 {marker-end:url(#mrkr4-184);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st16 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} - .st17 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} + .st15 {fill:#ffffff;stroke:none;stroke-linecap:butt} + .st16 {marker-end:url(#mrkr4-185);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st17 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} + .st18 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> @@ -37,23 +38,23 @@ - - - - + @@ -62,7 +63,7 @@ - + @@ -72,28 +73,28 @@ Actor lifeline.115 FW Utility - + Sheet.2 - + - + Sheet.3 - + - + Sheet.4 - + Sheet.5 - + - - - FW Utility + + + FW Utility - + @@ -102,28 +103,29 @@ Object lifeline.120 platform : PlatformBase<Object> - + Sheet.7 - + - + Sheet.8 - + - + Sheet.9 - + Sheet.10 - + - - - platform : PlatformBase<Object> + + + platform : PlatformBase<Object> - + @@ -132,36 +134,37 @@ Object lifeline.125 chassis : ChassisBase<DeviceBase> - + Sheet.12 - + - + Sheet.13 - + - + Sheet.14 - + Sheet.15 - + - + - - - chassis : ChassisBase<DeviceBase> + + + chassis : ChassisBase<DeviceBase> - + Activation.131 - + - + Message.133 <platform>.get_chassis() @@ -172,11 +175,11 @@ - - - - <platform>.get_chassis() - + + + + <platform>.get_chassis() + Return Message.134 return <chassis> @@ -187,11 +190,11 @@ - - - - return <chassis> - + + + + return <chassis> + @@ -200,28 +203,29 @@ Object lifeline.138 module : ModuleBase<DeviceBase> - + Sheet.20 - + - + Sheet.21 - + - + Sheet.22 - + Sheet.23 - + - + - - - module : ModuleBase<DeviceBase> + + + module : ModuleBase<DeviceBase> - + Message.162 <chassis>.get_name() @@ -232,11 +236,11 @@ - - - - <chassis>.get_name() - + + + + <chassis>.get_name() + Return Message.164 return <chassis_name> @@ -247,51 +251,51 @@ - - - - return <chassis_name> - + + + + return <chassis_name> + Activation.168 - + - + Activation.169 - + - + Activation.170 - + - + Activation.255 - + - + Activation.256 - + - + Message.257 <chassis>.get_all_modules() @@ -302,11 +306,11 @@ - - - - <chassis>.get_all_modules() - + + + + <chassis>.get_all_modules() + Return Message.258 return <module_list> @@ -317,20 +321,20 @@ - - - - return <module_list> - + + + + return <module_list> + Optional fragment.737 - - + + - + Sheet.34 opt @@ -345,29 +349,29 @@ - - - opt - + + + opt + Sheet.35 [ if <chassis_name> is found ] - - [ if <chassis_name> is found ] + + [ if <chassis_name> is found ] - + Loop fragment.946 - - + + - + Sheet.37 loop @@ -382,20 +386,20 @@ - - - loop - + + + loop + Sheet.38 [ for module in <module_list> ] - - [ for module in <module_list> ] + + [ for module in <module_list> ] - + Message.952 <module>.get_name() @@ -406,11 +410,11 @@ - - - - <module>.get_name() - + + + + <module>.get_name() + Return Message.953 return <module_name> @@ -421,36 +425,36 @@ - - - - return <module_name> - + + + + return <module_name> + Activation.954 - + - + Activation.955 - + - + Optional fragment.956 - - + + - + Sheet.44 opt @@ -465,38 +469,30 @@ - - - opt - + + + opt + Sheet.45 [ if <module_name> is found ] - - [ if <module_name> is found ] + + [ if <module_name> is found ] - + Activation.961 - + - - Activation.962 - - - - - - - + Message.963 - <module>.get_component_name_list() + <module>.get_all_components() @@ -505,13 +501,13 @@ - - - - <module>.get_component_name_list() - + + + + <module>.get_all_components() + Return Message.964 - return <component_name_list> + return <component_list> @@ -520,21 +516,21 @@ - - - - return <component_name_list> - + + + + return <component_list> + Optional fragment.965 - - + + - - Sheet.51 + + Sheet.50 opt @@ -548,28 +544,28 @@ - - - opt - - Sheet.52 - [ if <component_name> not in <component_name_list> or <image_... + + + opt + + Sheet.51 + [ if <image_path> not exists ] ] - - [ if <component_name> not in <component_name_list> or <image_path> not exists ] ] + + [ if <image_path> not exists ] ] - + Activation.968 - + - + Self Message.969 handle_error() @@ -580,21 +576,21 @@ - - - - handle_error() - + + + + handle_error() + Activation.970 - + - + Message.971 - <module>.install_component_firmware(<component_name>,<image_p... + <component>.install_firmware(<image_path>) @@ -603,19 +599,11 @@ - - - - <module>.install_component_firmware(<component_name>,<image_path>) - - Activation.972 - - - - - - - + + + + <component>.install_firmware(<image_path>) + Return Message.973 return <result> @@ -626,19 +614,19 @@ - - - - return <result> - + + + + return <result> + Activation.974 - + - + Self Message.975 show_result(<chassis_name>,<module_name>,<component_name>,<im... @@ -649,21 +637,21 @@ - - - - show_result(<chassis_name>,<module_name>,<component_name>,<image_path>,<result>) - + + + + show_result(<chassis_name>,<module_name>,<component_name>,<image_path>,<result>) + Optional fragment.980 - - + + - - Sheet.62 + + Sheet.60 opt @@ -677,28 +665,28 @@ - - - opt - - Sheet.63 + + + opt + + Sheet.61 [ if <chassis_name> is not found ] - - [ if <chassis_name> is not found ] + + [ if <chassis_name> is not found ] - + Activation.983 - + - + Self Message.984 handle_error() @@ -709,21 +697,21 @@ - - - - handle_error() - + + + + handle_error() + Optional fragment.985 - - + + - - Sheet.67 + + Sheet.65 opt @@ -737,28 +725,28 @@ - - - opt - - Sheet.68 + + + opt + + Sheet.66 [ if <module_name> is not found ] - - [ if <module_name> is not found ] + + [ if <module_name> is not found ] - + Activation.988 - + - + Self Message.989 handle_error() @@ -769,9 +757,191 @@ - - - - handle_error() + + + + handle_error() + + + + + + + + Object lifeline.1030 + сomponent : ComponentBase<Object> + + Sheet.70 + + + + Sheet.71 + + + + Sheet.72 + + + Sheet.73 + + + + + + + сomponent : ComponentBase<Object> + + + + + + + Loop fragment.1039 + + + + + Sheet.75 + loop + + + + + + + + + + + + + + + loop + + Sheet.76 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + + + + + Optional fragment.1044 + + + + + Sheet.78 + opt + + + + + + + + + + + + + + + opt + + Sheet.79 + [ if <component_name> is not found ] + + + + + + [ if <component_name> is not found ] + + + Activation.1047 + + + + + + + + Self Message.1048 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.972 + + + + + + + + Activation.962 + + + + + + + + + + + + Optional fragment.1051 + + + + + Sheet.85 + opt + + + + + + + + + + + + + + + opt + + Sheet.86 + [ if <component_name> is found ] + + + + + + [ if <component_name> is found ] + diff --git a/doc/fwutil/images/install_non_modular_flow.svg b/doc/fwutil/images/install_non_modular_flow.svg index 172e35e6066..c0f25a64fcb 100755 --- a/doc/fwutil/images/install_non_modular_flow.svg +++ b/doc/fwutil/images/install_non_modular_flow.svg @@ -2,8 +2,8 @@ + xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="11.1438in" height="15.8458in" + viewBox="0 0 802.354 1140.9" xml:space="preserve" color-interpolation-filters="sRGB" class="st19"> fwutil flows @@ -16,20 +16,22 @@ .st1 {fill:#5b9bd5;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st2 {stroke:#000000;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st3 {fill:#ffffff;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st4 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st5 {marker-end:url(#mrkr4-47);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st6 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} - .st7 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} - .st8 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st9 {marker-end:url(#mrkr3-55);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st10 {fill:#b43500;fill-opacity:0;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st11 {fill:#ffffff;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st12 {fill:#b43500;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st13 {fill:#ac770d;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st14 {marker-end:url(#mrkr4-119);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st15 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} - .st16 {fill:#ffffff;stroke:none;stroke-linecap:butt} - .st17 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} + .st4 {font-size:1em} + .st5 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st6 {marker-end:url(#mrkr4-49);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st7 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} + .st8 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} + .st9 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st10 {marker-end:url(#mrkr3-57);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st11 {fill:#b43500;fill-opacity:0;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st12 {fill:#ffffff;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st13 {fill:#b43500;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st14 {fill:#ac770d;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st15 {marker-end:url(#mrkr4-122);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st16 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} + .st17 {fill:#ffffff;stroke:none;stroke-linecap:butt} + .st18 {fill:#813b00;font-size:1em} + .st19 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> @@ -37,23 +39,23 @@ - - - - + @@ -62,7 +64,7 @@ - + @@ -72,28 +74,28 @@ Actor lifeline.474 FW Utility - + Sheet.2 - + - + Sheet.3 - + - + Sheet.4 - + Sheet.5 - + - - - FW Utility + + + FW Utility - + @@ -102,28 +104,29 @@ Object lifeline.479 platform : PlatformBase<Object> - + Sheet.7 - + - + Sheet.8 - + - + Sheet.9 - + Sheet.10 - + - - - platform : PlatformBase<Object> + + + platform :PlatformBase<Object> - + @@ -132,36 +135,37 @@ Object lifeline.484 chassis : ChassisBase<DeviceBase> - + Sheet.12 - + - + Sheet.13 - + - + Sheet.14 - + Sheet.15 - + - + - - - chassis : ChassisBase<DeviceBase> + + + chassis :ChassisBase<DeviceBase> - + Activation.489 - + - + Message.490 <platform>.get_chassis() @@ -172,11 +176,11 @@ - - - - <platform>.get_chassis() - + + + + <platform>.get_chassis() + Return Message.491 return <chassis> @@ -187,11 +191,11 @@ - - - - return <chassis> - + + + + return <chassis> + Message.508 <chassis>.get_name() @@ -202,11 +206,11 @@ - - - - <chassis>.get_name() - + + + + <chassis>.get_name() + Return Message.509 return <chassis_name> @@ -217,44 +221,44 @@ - - - - return <chassis_name> - + + + + return <chassis_name> + Activation.510 - + - + Activation.511 - + - + Activation.512 - + - + Optional fragment.541 - - + + - + Sheet.25 opt @@ -269,38 +273,38 @@ - - - opt - + + + opt + Sheet.26 [ if <chassis_name> is found ] - - [ if <chassis_name> is found ] + + [ if <chassis_name> is found ] - + Activation.928 - + - + Activation.929 - + - + Message.930 - <chassis>.get_component_name_list() + <chassis>.get_all_components() @@ -309,13 +313,13 @@ - - - - <chassis>.get_component_name_list() - + + + + <chassis>.get_all_components() + Return Message.931 - return <component_name_list> + return <component_list> @@ -324,20 +328,20 @@ - - - - return <component_name_list> - + + + + return <component_list> + Optional fragment.932 - - + + - + Sheet.32 opt @@ -352,28 +356,29 @@ - - - opt - + + + opt + Sheet.33 - [ if <component_name> not in <component_name_list> or <image_... + [ if <image_path> not exists ] ] - - [ if <component_name> not in <component_name_list> or <image_path> not exists ] ] + + [ if <image_path> not exists ] ] - + Activation.935 - + - + Self Message.936 handle_error() @@ -384,21 +389,21 @@ - - - - handle_error() - + + + + handle_error() + Activation.937 - + - + Message.938 - <chassis>.install_component_firmware(<component_name>,<image_... + <component>.install_firmware(<image_path>) @@ -407,19 +412,11 @@ - - - - <chassis>.install_component_firmware(<component_name>,<image_path>) - - Activation.939 - - - - - - - + + + + <component>.install_firmware(<image_path>) + Return Message.940 return <result> @@ -430,21 +427,21 @@ - - - - return <result> - + + + + return <result> + Optional fragment.990 - - + + - - Sheet.41 + + Sheet.40 opt @@ -458,28 +455,28 @@ - - - opt - - Sheet.42 + + + opt + + Sheet.41 [ if <chassis_name> is not found ] - - [ if <chassis_name> is not found ] + + [ if <chassis_name> is not found ] - + Activation.993 - + - + Self Message.994 handle_error() @@ -490,19 +487,19 @@ - - - - handle_error() - + + + + handle_error() + Activation.995 - + - + Self Message.996 show_result(<chassis_name>,<component_name>,<image_path>,<res... @@ -513,9 +510,230 @@ - - - - show_result(<chassis_name>,<component_name>,<image_path>,<result>) + + + + show_result(<chassis_name>,<component_name>,<image_path>,<result>) + + + + + + + + Object lifeline.999 + сomponent : ComponentBase<Object> + + Sheet.47 + + + + Sheet.48 + + + + Sheet.49 + + + Sheet.50 + + + + + + + сomponent : ComponentBase<Object> + + + + + + + Loop fragment.1006 + + + + + Sheet.52 + loop + + + + + + + + + + + + + + + loop + + Sheet.53 + [ for component in <component_list> ] + + + + + + [ for component in <component_list> ] + + + Message.1011 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1012 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1013 + + + + + + + + Activation.1014 + + + + + + + + + + + + Optional fragment.1017 + + + + + Sheet.59 + opt + + + + + + + + + + + + + + + opt + + Sheet.60 + [ if <component_name> is found ] + + + + + + [ if <component_name> is found ] + + + + + + + Optional fragment.1024 + + + + + Sheet.62 + opt + + + + + + + + + + + + + + + opt + + Sheet.63 + [ if <component_name> is not found ] + + + + + + [ if <component_name> is not found ] + + + Activation.1027 + + + + + + + + Self Message.1028 + handle_error() + + + + + + + + + + + + handle_error() + + Activation.939 + + + + + + diff --git a/doc/fwutil/images/show_status_flow.svg b/doc/fwutil/images/show_status_flow.svg index 0ed6c7cb31a..3f355dfc37e 100755 --- a/doc/fwutil/images/show_status_flow.svg +++ b/doc/fwutil/images/show_status_flow.svg @@ -1,9 +1,9 @@ - + + xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="13.8997in" height="17.519in" + viewBox="0 0 1000.78 1261.37" xml:space="preserve" color-interpolation-filters="sRGB" class="st21"> fwutil flows @@ -16,22 +16,24 @@ .st1 {fill:#5b9bd5;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st2 {stroke:#000000;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} .st3 {fill:#ffffff;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st4 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st5 {marker-end:url(#mrkr4-47);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st6 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} - .st7 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} - .st8 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st9 {marker-end:url(#mrkr3-55);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st10 {fill:#ffffff;stroke:none;stroke-linecap:butt} - .st11 {fill:#b43500;fill-opacity:0;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st12 {fill:#ffffff;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} - .st13 {fill:#b43500;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st14 {fill:#ac770d;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st15 {marker-end:url(#mrkr4-142);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} - .st16 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} - .st17 {fill:#813b00;font-size:1em} - .st18 {fill:#813b00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} - .st19 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} + .st4 {font-size:1em} + .st5 {fill:#af5200;stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st6 {marker-end:url(#mrkr4-49);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st7 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.23584905660377} + .st8 {fill:#ffffff;stroke:none;stroke-linecap:butt} + .st9 {fill:#803a00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st10 {marker-end:url(#mrkr3-57);stroke:#a54d00;stroke-dasharray:7,5;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st11 {fill:#ffffff;stroke:none;stroke-linecap:butt;stroke-width:7.2} + .st12 {fill:#b43500;fill-opacity:0;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st13 {fill:#ffffff;stroke:#b43500;stroke-linecap:round;stroke-linejoin:round;stroke-width:1} + .st14 {fill:#b43500;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st15 {fill:#ac770d;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st16 {marker-end:url(#mrkr4-145);stroke:#a54d00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5} + .st17 {fill:#a54d00;fill-opacity:1;stroke:#a54d00;stroke-opacity:1;stroke-width:0.13368983957219} + .st18 {fill:#813b00;font-size:1em} + .st19 {fill:#813b00;font-family:Segoe UI;font-size:1.00001em;font-weight:bold} + .st20 {fill:#803a00;font-size:1em} + .st21 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> @@ -39,32 +41,32 @@ - - - - + - Page-5 + Page-4 - + @@ -74,28 +76,28 @@ Actor lifeline.764 FW Utility - + Sheet.2 - + - + Sheet.3 - + - + Sheet.4 - + Sheet.5 - + - - - FW Utility + + + FW Utility - + @@ -104,28 +106,29 @@ Object lifeline.769 platform : PlatformBase<Object> - + Sheet.7 - + - + Sheet.8 - + - + Sheet.9 - + Sheet.10 - + - - - platform : PlatformBase<Object> + + + platform : PlatformBase<Object> - + @@ -134,36 +137,37 @@ Object lifeline.774 chassis : ChassisBase<DeviceBase> - + Sheet.12 - + - + Sheet.13 - + - + Sheet.14 - + Sheet.15 - + - + - - - chassis : ChassisBase<DeviceBase> + + + chassis : ChassisBase<DeviceBase> - + Activation.779 - + - + Message.780 <platform>.get_chassis() @@ -174,11 +178,11 @@ - - - - <platform>.get_chassis() - + + + + <platform>.get_chassis() + Return Message.781 return <chassis> @@ -189,11 +193,11 @@ - - - - return <chassis> - + + + + return <chassis> + @@ -202,36 +206,37 @@ Object lifeline.782 module : ModuleBase<DeviceBase> - + Sheet.20 - + - + Sheet.21 - + - + Sheet.22 - + Sheet.23 - + - + - - - module : ModuleBase<DeviceBase> + + + module : ModuleBase<DeviceBase> - + Activation.795 - + - + Message.845 <chassis>.get_name() @@ -242,11 +247,11 @@ - - - - <chassis>.get_name() - + + + + <chassis>.get_name() + Return Message.846 return <chassis_name> @@ -257,36 +262,36 @@ - - - - return <chassis_name> - + + + + return <chassis_name> + Activation.847 - + - + Activation.848 - + - + Loop fragment.851 - - + + - + Sheet.30 loop @@ -301,20 +306,20 @@ - - - loop - + + + loop + Sheet.31 [ for module in <module_list> ] - - [ for module in <module_list> ] + + [ for module in <module_list> ] - + Message.856 <module>.get_name() @@ -325,11 +330,11 @@ - - - - <module>.get_name() - + + + + <module>.get_name() + Return Message.857 return <module_name> @@ -340,45 +345,45 @@ - - - - return <module_name> - + + + + return <module_name> + Activation.858 - + - + Activation.859 - + - + Activation.863 - + - + Activation.864 - + - + Message.865 - <module>.get_component_name_list() + <module>.get_all_components() @@ -387,13 +392,13 @@ - - - - <module>.get_component_name_list() - + + + + <module>.get_all_components() + Return Message.866 - return <component_name_list> + return <component_list> @@ -402,19 +407,19 @@ - - - - return <component_name_list> - + + + + return <component_list> + Activation.868 - + - + Self Message.869 show_status(<chassis_component_map>,<module_component_map>) @@ -425,30 +430,30 @@ - - - - show_status(<chassis_component_map>,<module_component_map>) - + + + + show_status(<chassis_component_map>,<module_component_map>) + Activation.872 - + - + Activation.873 - + - + Message.874 - <chassis>.get_component_name_list() + <chassis>.get_all_components() @@ -457,13 +462,13 @@ - - - - <chassis>.get_component_name_list() - + + + + <chassis>.get_all_components() + Return Message.875 - return <component_name_list> + return <component_list> @@ -472,20 +477,20 @@ - - - - return <component_name_list> - + + + + return <component_list> + Loop fragment.877 - - + + - + Sheet.47 loop @@ -500,30 +505,30 @@ - - - loop - + + + loop + Sheet.48 - [ for component_name in <component_name_list> ] + [ for component in <component_list> ] - - [ for component_name in <component_name_list> ] + + [ for component in <component_list> ] - + Activation.884 - + - + Self Message.885 - chassis_component_map[<chassis_name>][<component_name>] = <fi... + chassis_component_map[<chassis_name>][<component_name>] = (<f... @@ -532,14 +537,15 @@ - - - - chassis_component_map[<chassis_name>][<component_name>] = <firmware_version> - + + + + chassis_component_map[<chassis_name>][<component_name>] = (<firmware_version>,<description>) + Message.889 - <chassis>.get_firmware_version(<component_name>) + <component>.get_firmware_version() @@ -548,11 +554,12 @@ - - - - <chassis>.get_firmware_version(<component_name>) - + + + + <component>.get_firmware_version() + Return Message.890 return <firmware_version> @@ -563,43 +570,35 @@ - - - - return <firmware_version> - + + + + return <firmware_version> + Activation.891 - + - - Activation.892 - - - - - - - + Activation.898 - + - + Activation.899 - + - + Message.900 <chassis>.get_all_modules() @@ -610,11 +609,11 @@ - - - - <chassis>.get_all_modules() - + + + + <chassis>.get_all_modules() + Return Message.901 return <module_list> @@ -625,21 +624,156 @@ - - - - return <module_list> - + + + + return <module_list> + + + - Loop fragment.902 - - + Object lifeline.1062 + сomponent : ComponentBase<Object> + + Sheet.59 + - + Sheet.60 + + + + Sheet.61 + + + Sheet.62 + + + + + + + сomponent : ComponentBase<Object> + + + Message.1072 + <component>.get_description() + + + + + + + + + + + + <component>.get_description() + + Return Message.1073 + return <description> + + + + + + + + + + + + return <description> + + Activation.1074 + + + + + + + + Activation.1075 + + + + + + + + Activation.892 + + + + + + + + Message.1078 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1079 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1080 + + + + + + + + Activation.1081 + + + + + + + + + + + + Loop fragment.1083 + + + + + Sheet.73 loop @@ -653,87 +787,184 @@ - - - loop - - Sheet.61 - [ for component_name in <component_name_list> ] + + + loop + + Sheet.74 + [ for component in <component_list> ] - - [ for component_name in <component_name_list> ] + + [ for component in <component_list> ] - - Activation.905 + + Activation.1086 - + - + - - Self Message.906 + + Self Message.1087 module_component_map[<chassis_name>][<module_name>][<componen... - + - - - - module_component_map[<chassis_name>][<module_name>][<component_name>] = <firmware_version> - - Message.907 - <module>.get_firmware_version(<component_name>) + + + + module_component_map[<chassis_name>][<module_name>][<component_name>] = (<firmware_version>,<description>) + + Message.1088 + <component>.get_firmware_version() - + - - - - <module>.get_firmware_version(<component_name>) - - Return Message.908 + + + + <component>.get_firmware_version() + + Return Message.1089 return <firmware_version> - + - - - - return <firmware_version> - - Activation.909 + + + + return <firmware_version> + + Activation.1090 - + - + - - Activation.910 + + Message.1091 + <component>.get_description() + + + - + + + + + + + <component>.get_description() + + Return Message.1092 + return <description> + + + + + + + + + + + + return <description> + + Activation.1093 + + + + + + + + Activation.1094 + + + + + + + + Activation.1095 + + + + + + + + Message.1096 + <component>.get_name() + + + + + + + + + + + + <component>.get_name() + + Return Message.1097 + return <component_name> + + + + + + + + + + + + return <component_name> + + Activation.1098 + + + + + + + + Activation.1099 + + + - + From 07e10904e7e203e2c904321be2ed7307b46e9488 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Wed, 18 Dec 2019 18:44:33 +0000 Subject: [PATCH 5/5] Updated fwutil HLD: rev 0.5. Signed-off-by: Nazarii Hnydyn --- doc/fwutil/fwutil.md | 183 ++++++++++++++++++++++++------------------- 1 file changed, 102 insertions(+), 81 deletions(-) diff --git a/doc/fwutil/fwutil.md b/doc/fwutil/fwutil.md index 15ac47a50dd..9f524880f32 100755 --- a/doc/fwutil/fwutil.md +++ b/doc/fwutil/fwutil.md @@ -27,7 +27,7 @@ - [2.2.2.3 Update commands](#2223-update-commands) - [2.2.2.3.1 Overview](#22231-overview) - [2.2.2.3.2 Description](#22232-description) -- [4 Flows](#3-flows) +- [3 Flows](#3-flows) - [3.1 Show components status](#31-show-components-status) - [3.2 Install component FW](#32-install-component-fw) - [3.2.1 Non modular chassis platform](#321-non-modular-chassis-platform) @@ -46,6 +46,7 @@ This document provides general information about FW utility implementation in SO | 0.1 | 21/08/2019 | Nazarii Hnydyn | Initial version | | 0.2 | 10/09/2019 | Nazarii Hnydyn | Review feedback and other changes | | 0.3 | 17/09/2019 | Nazarii Hnydyn | Align flows with the platform API | +| 0.4 | 18/12/2019 | Nazarii Hnydyn | CLI review feedback | ## Abbreviations @@ -160,7 +161,7 @@ Modular chassis platforms may contain only one chassis. A chassis may contain one or more modules and it's own set of components. Each module may contain it's own set of components. -Basically each chassis/module may contain one or more components (e.g., BIOS/ASIC/CPLD/FPGA). +Basically each chassis/module may contain one or more components (e.g., BIOS/CPLD/FPGA). SONiC platform API provides an interface for FW maintenance operations for both modular and non modular chassis platforms. Both modular and non modular chassis platforms share the same platform API, @@ -178,13 +179,16 @@ fwutil |--- show | |--- status | |--- version +| |--- install -| |--- chassis +| |--- chassis +| | |--- component +| | |--- fw -y|--yes +| | +| |--- module | |--- component -| | |--- fw -y|--yes -| |--- module -| |--- component -| |--- fw -y|--yes +| |--- fw -y|--yes +| |--- update -y|--yes -f|--force -i|--image= ``` @@ -213,7 +217,7 @@ fwutil version 1.0.0.0 ```bash root@sonic:~# fwutil show status Chassis Module Component Version Description --------- ------- ---------- -------- ------------ +-------- ------- ---------- ------------------ ------------ Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS CPLD 5 Chassis CPLD FPGA 5 Chassis FPGA @@ -223,12 +227,11 @@ Chassis1 N/A BIOS 0ACLH003_02.02.007 Chassis BIOS ```bash root@sonic:~# fwutil show status Chassis Module Component Version Description --------- ------- ---------- -------- ------------ +-------- ------- ---------- ------------------ ------------ Chassis1 BIOS 0ACLH004_02.02.007 Chassis BIOS CPLD 5 Chassis CPLD FPGA 5 Chassis FPGA - Module1 ASIC 29.2000.1886 Module ASIC - CPLD 5 Module CPLD + Module1 CPLD 5 Module CPLD FPGA 5 Module FPGA ``` @@ -244,17 +247,17 @@ for manual FW update of various platform components. **The following command installs FW:** 1. Non modular chassis platform ```bash -root@sonic:~# fwutil install chassis Chassis1 component BIOS fw --yes /bios.bin +root@sonic:~# fwutil install chassis component BIOS fw --yes /bios.bin ... FW update in progress ... ... Warning: Cold reboot is required! -root@sonic:~# fwutil install chassis Chassis1 component CPLD fw --yes /cpld.bin +root@sonic:~# fwutil install chassis component CPLD fw --yes /cpld.bin ... FW update in progress ... ... Warning: Power cycle is required! -root@sonic:~# fwutil install chassis Chassis1 component FPGA fw --yes /fpga.bin +root@sonic:~# fwutil install chassis component FPGA fw --yes /fpga.bin ... FW update in progress ... ... @@ -263,23 +266,20 @@ Warning: Power cycle is required! 2. Modular chassis platform ```bash -root@sonic:~# fwutil install chassis Chassis1 component BIOS fw /bios.bin -New FW will be installed, continue? [y/n]: n +root@sonic:~# fwutil install chassis component BIOS fw /bios.bin +New FW will be installed, continue? [y/N]: N Aborted! -root@sonic:~# fwutil install chassis Chassis1 component CPLD fw /cpld.bin -New FW will be installed, continue? [y/n]: n +root@sonic:~# fwutil install chassis component CPLD fw /cpld.bin +New FW will be installed, continue? [y/N]: N Aborted! -root@sonic:~# fwutil install chassis Chassis1 component FPGA fw /fpga.bin -New FW will be installed, continue? [y/n]: n +root@sonic:~# fwutil install chassis component FPGA fw /fpga.bin +New FW will be installed, continue? [y/N]: N Aborted! -root@sonic:~# fwutil install chassis Chassis1 module Module1 component ASIC fw /asic.bin -New FW will be installed, continue? [y/n]: n +root@sonic:~# fwutil install module Module1 component CPLD fw /cpld.bin +New FW will be installed, continue? [y/N]: N Aborted! -root@sonic:~# fwutil install chassis Chassis1 module Module1 component CPLD fw /cpld.bin -New FW will be installed, continue? [y/n]: n -Aborted! -root@sonic:~# fwutil install chassis Chassis1 module Module1 component FPGA fw /fpga.bin -New FW will be installed, continue? [y/n]: n +root@sonic:~# fwutil install module Module1 component FPGA fw /fpga.bin +New FW will be installed, continue? [y/N]: N Aborted! ``` @@ -297,46 +297,69 @@ Automatic FW update requires platform_components.json to be created and placed a _sonic-buildimage/device///platform_components.json_ **Example:** +1. Non modular chassis platform ```json { "chassis": { "Chassis1": { "component": { "BIOS": { - "image": "/etc//fw/chassis1/bios/bios.bin", - "firmware": "0ACLH003_02.02.010", + "firmware": "/etc//fw//chassis1/bios.bin", + "version": "0ACLH003_02.02.010", "info": "Cold reboot is required" }, "CPLD": { - "image": "/etc//fw/chassis1/cpld/cpld.bin", - "firmware": "10", + "firmware": "/etc//fw//chassis1/cpld.bin", + "version": "10", "info": "Power cycle is required" }, "FPGA": { - "image": "/etc//fw/chassis1/fpga/fpga.bin", - "firmware": "5", + "firmware": "/etc//fw//chassis1/fpga.bin", + "version": "5", "info": "Power cycle is required" } - }, - "module": { - "Module1": { - "component": { - "ASIC": { - "image": "/etc//fw/chassis1/module1/asic/asic.bin", - "firmware": "29.2000.1894", - "info": "Cold reboot is required" - }, - "CPLD": { - "image": "/etc//fw/chassis1/module1/cpld/cpld.bin", - "firmware": "10", - "info": "Power cycle is required" - }, - "FPGA": { - "image": "/etc//fw/chassis1/module1/fpga/fpga.bin", - "firmware": "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" } } } @@ -344,7 +367,7 @@ _sonic-buildimage/device///platform_components.jso } ``` -**Note:** FW update will be skipped if path is not specified (e.g., 'image': "") +**Note:** FW update will be skipped if component definition is not provided (e.g., 'BIOS': { }) ##### 2.2.2.3.2 Description @@ -352,12 +375,12 @@ _sonic-buildimage/device///platform_components.jso 1. Non modular chassis platform ```bash root@sonic:~# fwutil update --image=next -Chassis Module Component Version Image Firmware Status Info --------- ------- ---------- -------- ------ --------- ------- ----- -Chassis1 N/A BIOS 0ACLH004_02.02.007 /bios.bin 0ACLH004_02.02.010 pending update Cold reboot is required - CPLD 5 /cpld.bin 10 pending update Power cycle is required - FPGA 5 /fpga.bin 5 up to date Power cycle is required -New FW will be installed, continue? [y/n]: y +Chassis Module Component Firmware Version Status Info +-------- ------- ---------- --------------------- --------------------------------------- ------------------ ----------------------- +Chassis1 N/A BIOS /bios.bin 0ACLH004_02.02.007 / 0ACLH004_02.02.010 update is required Cold reboot is required + CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required +New FW will be installed, continue? [y/N]: y ... FW update in progress ... @@ -366,24 +389,23 @@ FW update in progress ... Summary: Chassis Module Component Status --------- ------- ---------- ------- -Chassis1 N/A BIOS update successful - CPLD update failed - FPGA up to date +-------- ------- ---------- ---------- +Chassis1 N/A BIOS success + CPLD failure + FPGA up-to-date ``` 2. Modular chassis platform ```bash root@sonic:~# fwutil update --image=next -Chassis Module Component Version Image Firmware Status Info --------- ------- ---------- -------- ------ --------- ------- ----- -Chassis1 BIOS 0ACLH004_02.02.007 /bios.bin 0ACLH004_02.02.010 pending update Cold reboot is required - CPLD 5 /cpld.bin 10 pending update Power cycle is required - FPGA 5 /fpga.bin 5 up to date Power cycle is required - Module1 ASIC 29.2000.1886 /asic.bin 29.2000.1894 pending update Cold reboot is required - CPLD 5 /cpld.bin 10 pending update Power cycle is required - FPGA 5 /fpga.bin 5 up to date Power cycle is required -New FW will be installed, continue? [y/n]: y +Chassis Module Component Firmware Version Status Info +-------- ------- ---------- --------------------- --------------------------------------- ------------------ ----------------------- +Chassis1 BIOS /bios.bin 0ACLH004_02.02.007 / 0ACLH004_02.02.010 update is required Cold reboot is required + CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required + Module1 CPLD /cpld.bin 5 / 10 update is required Power cycle is required + FPGA /fpga.bin 5 / 5 up-to-date Power cycle is required +New FW will be installed, continue? [y/N]: y ... FW update in progress ... @@ -392,13 +414,12 @@ FW update in progress ... Summary: Chassis Module Component Status --------- ------- ---------- ------- -Chassis1 BIOS update successful - CPLD update successful - FPGA up to date - Module1 ASIC update successful - CPLD update failed - FPGA up to date +-------- ------- ---------- ---------- +Chassis1 BIOS success + CPLD success + FPGA up-to-date + Module1 CPLD failure + FPGA up-to-date ``` **Supported options:** @@ -438,4 +459,4 @@ Chassis1 BIOS update successful 2. Show components status 3. Install new BIOS/CPLD/FPGA FW on non modular chassis 4. Install new BIOS/CPLD/FPGA FW on modular chassis -5. Update FW on all available chassis components +5. Update FW on all available platform components