-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fwutil.md] Fwutil Auto-update support #648
Changes from 3 commits
19325ff
fc6ea86
16ed6f2
e7cf636
15b74f0
a16ee43
04cc424
e8c8a15
503c3e8
4a7454f
72a0845
ff5441b
ac2bc84
4b14a26
c4aed03
fbaf6f4
d1a8e93
314cc36
0acc4c9
5a2324e
44afb41
289263e
8700f97
efca3bf
8cbf627
93416e5
4c76c14
3574859
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -340,7 +340,7 @@ The purpose of the update commands group is to provide an interface | |
for automatic FW installation of various platform components. | ||
|
||
Automatic FW installation requires platform_components.json to be created and placed at: | ||
_sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.json_ | ||
_sonic-buildimage/device/<platform_name>/<onie_platform>/platform_fw_updatecomponents.json_ | ||
|
||
**Example:** | ||
1. Non modular chassis platform | ||
|
@@ -350,15 +350,15 @@ _sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.jso | |
"Chassis1": { | ||
"component": { | ||
"BIOS": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/bios.bin", | ||
"version": "0ACLH003_02.02.010" | ||
}, | ||
"CPLD": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/cpld.bin", | ||
"version": "10" | ||
}, | ||
"FPGA": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/fpga.bin", | ||
"version": "5" | ||
} | ||
} | ||
|
@@ -374,15 +374,15 @@ _sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.jso | |
"Chassis1": { | ||
"component": { | ||
"BIOS": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/bios.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/bios.bin", | ||
"version": "0ACLH003_02.02.010" | ||
}, | ||
"CPLD": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/cpld.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/cpld.bin", | ||
"version": "10" | ||
}, | ||
"FPGA": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/chassis1/fpga.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/fpga.bin", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang Not sure whether this is the right place for fw binaries. Also this may overlap with the sonic_device_data package contents. |
||
"version": "5" | ||
} | ||
} | ||
|
@@ -392,18 +392,50 @@ _sonic-buildimage/device/<platform_name>/<onie_platform>/platform_components.jso | |
"Module1": { | ||
"component": { | ||
"CPLD": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/cpld.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/cpld.bin", | ||
"version": "10" | ||
}, | ||
"FPGA": { | ||
"firmware": "/etc/<platform_name>/fw/<onie_platform>/module1/fpga.bin", | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/fpga.bin", | ||
"version": "5" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
3. Platform component fw update configuration with platform specific script and boot options | ||
```json | ||
{ | ||
"chassis": { | ||
"Chassis1": { | ||
"component": { | ||
"BIOS": { | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/bios.bin", | ||
"script": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/bios_fw_update", | ||
"version": "0ACLH003_02.02.010" | ||
"required_reboot": "None" | ||
"immediate_action": "No" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang IMHO, this should be fetched automatically by Platform API if needed. Use case: the same firmware package may have a different behaviour based on device vendor/model. |
||
}, | ||
"CPLD": { | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/cpld.bin", | ||
"script": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/cpld_fw_update", | ||
"version": "10" | ||
"required_reboot": "powercycle" | ||
"immediate_action": "No" | ||
}, | ||
"FPGA": { | ||
"firmware": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/fpga.bin", | ||
"script": "/usr/share/sonic/<platform_name>/<onie_platform>/fw_update/fpga_fw_update", | ||
"version": "5" | ||
"required_reboot": "cold" | ||
"immediate_action": "Yes" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
**Note:** | ||
1. FW update will be disabled if component definition is not provided (e.g., 'BIOS': { }) | ||
|
@@ -454,6 +486,24 @@ Warning: <firmware_update_notification> | |
New FW will be installed, continue? [y/N]: N | ||
Aborted! | ||
``` | ||
3. Non modular chassis platform | ||
```bash | ||
root@sonic:~# fwutil --yes --image=next --boot=cold --immediate=yes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang I suggest to use something like: |
||
Warning: <firmware_update_notification> | ||
... | ||
FW update in progress ... | ||
... | ||
root@sonic:~# fwutil --yes --image=next --boot=any --immediate=no | ||
Warning: <firmware_update_notification> | ||
... | ||
FW update in progress ... | ||
... | ||
root@sonic:~# fwutil --yes --image=next --boot=any --immediate=yes --component=ssd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang What about modular platforms? AFAIK, there is no clear restrictions on component names, which means that different modules can share the same component name. And what should be the expected behaviour in that case? |
||
Warning: <firmware_update_notification> | ||
... | ||
FW update in progress ... | ||
... | ||
``` | ||
|
||
**Supported options:** | ||
1. -y|--yes - automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively | ||
|
@@ -490,6 +540,24 @@ Aborted! | |
|
||
###### Figure 5: FW install (modular) flow | ||
|
||
## 3.4 Update component FW | ||
|
||
### 3.4.1 Non modular chassis platform | ||
|
||
TBD | ||
|
||
### 3.4.2 Modular chassis platform | ||
|
||
TBD | ||
|
||
### 3.4.3 Auto FW update based on the configuration file | ||
|
||
1. Find the available firmware based on boot type and immediate action type from platform specific fw update configuration file. | ||
Exit if no configuration file exists. | ||
2. Update the firmware using the script if it's specified in the configuration. Otherwise, fwutil will use the platform api to update the firmware. | ||
Exit if the update fails in any step. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang I would like to propose a new CLI tree:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang Some thoughts:
|
||
|
||
|
||
# 4 Tests | ||
|
||
## 4.1 Unit tests | ||
|
@@ -501,3 +569,4 @@ Aborted! | |
5. Install BIOS/CPLD/FPGA FW on modular chassis | ||
6. Update BIOS/CPLD/FPGA FW on non modular chassis | ||
7. Update BIOS/CPLD/FPGA FW on modular chassis | ||
8. Auto Update BIOS/CPLD/FPGA FW with boot and action options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sujinmkang Typo? Maybe it's better to have something like
platform_fw_updates
?