Skip to content

[202205][Mellanox] Place FW binaries under platform directory instead of squashfs#13838

Merged
liat-grozovik merged 3 commits intosonic-net:202205from
stepanblyschak:2205-new-fw-loc
Feb 22, 2023
Merged

[202205][Mellanox] Place FW binaries under platform directory instead of squashfs#13838
liat-grozovik merged 3 commits intosonic-net:202205from
stepanblyschak:2205-new-fw-loc

Conversation

@stepanblyschak
Copy link
Copy Markdown
Collaborator

@stepanblyschak stepanblyschak commented Feb 16, 2023

Fixes #13568
Backport of #13837

Upgrade from old image always requires squashfs mount to get the next image FW binary. This can be avoided if we put FW binary under platform directory which is easily accessible after installation:

admin@r-spider-05:~$ ls /host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa
/host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa
admin@r-spider-05:~$ ls -al /tmp/image-fw-new-loc.0-dirty-20230208.193534-fs/etc/mlnx/fw-SPC.mfa
lrwxrwxrwx 1 root root 66 Feb  8 17:57 /tmp/image-fw-new-loc.0-dirty-20230208.193534-fs/etc/mlnx/fw-SPC.mfa -> /host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa

Why I did it

202211 and above uses different squashfs compression type that 201911 kernel can not handle. Therefore, we avoid mounting squashfs altogether with this change.

How I did it

  • Place FW binary under /host/image-/platform/mlnx/, soft links in /etc/mlnx are created to avoid breaking existing scripts/automation.
  • /etc/mlnx/fw-SPCX.mfa is a soft link always pointing to the FW that should be used in current image
  • mlnx-fw-upgrade.sh is updated to prefer /host/image-/platform/mlnx location and fallback to /etc/mlnx in squashfs in case new location does not exist. This is necessary to do image downgrade.

How to verify it

  • Upgrade from 201911 to 202205
  • 202205 to 201911 downgrade
  • 202205 -> 202205 reboot
  • ONIE -> 202205 boot (First FW burn)

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

stepanblyschak and others added 3 commits February 13, 2023 14:07
Upgrade from old image always requires squashfs mount to get the next
image FW binary. This can be avoided if we put FW binary under platform
directory which is easily accessible after installation:

```
admin@r-spider-05:~$ ls /host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa
/host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa
admin@r-spider-05:~$ ls -al /tmp/image-fw-new-loc.0-dirty-20230208.193534-fs/etc/mlnx/fw-SPC.mfa
lrwxrwxrwx 1 root root 66 Feb  8 17:57 /tmp/image-fw-new-loc.0-dirty-20230208.193534-fs/etc/mlnx/fw-SPC.mfa -> /host/image-fw-new-loc.0-dirty-20230208.193534/platform/fw-SPC.mfa
```

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Co-authored-by: Nazarii Hnydyn <nazariig@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak
Copy link
Copy Markdown
Collaborator Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik changed the title [202205][nvidia] Place FW binaries under platform directory instead of squashfs [202205][Mellanox] Place FW binaries under platform directory instead of squashfs Feb 19, 2023
@stepanblyschak stepanblyschak marked this pull request as draft February 21, 2023 17:43
@stepanblyschak stepanblyschak marked this pull request as ready for review February 22, 2023 11:42
@liat-grozovik liat-grozovik merged commit 70e2ea1 into sonic-net:202205 Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants