sonic-buildimage/files
Stepan Blyshchak 70e2ea1e87
[202205][Mellanox] Place FW binaries under platform directory instead of squashfs (#13838)
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)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2023-02-22 17:40:50 +02:00
..
Aboot Use tmpfs for /var/log on Arista 7050CX3-32S (#13805) (#13843) 2023-02-21 13:25:35 -08:00
apt [Build] Support j2 template for debian sources (#12557) (#13185) 2022-12-30 09:47:33 +08:00
build/versions [ci/build]: Upgrade SONiC package versions (#13893) 2023-02-21 19:42:54 +08:00
build_scripts During build time mask only those feature/services that are disabled excplicitly (#13283) (#13296) 2023-01-09 10:28:03 -08:00
build_templates [202205][Mellanox] Place FW binaries under platform directory instead of squashfs (#13838) 2023-02-22 17:40:50 +02:00
dhcp ZTP infrastructure changes to support DHCP discovery provisioning data (#3298) 2019-12-10 08:16:56 -08:00
docker [dockerd] Force usage of cgo DNS resolver (#13649) 2023-02-22 04:33:44 +08:00
image_config Clear DNS configuration received from DHCP during networking reconfiguration in Linux. (#13516) (#13695) 2023-02-10 09:11:05 -08:00
initramfs-tools [202205][Arista] Add initial support for 720DT-48S (#10656) (#11860) 2022-08-30 12:39:26 +08:00
scripts change default to be on (#13495) (#13498) 2023-01-25 09:58:53 -08:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) 2022-04-25 10:38:52 -07:00