sonic-buildimage/files/build_templates
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
..
per_namespace [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
share_image [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
arp_update_vars.j2 Enable ARP Update Script for Packet based chassis. (#11465) 2022-07-28 20:36:54 +00:00
backend_acl.j2 Add backend acl template (#11220) 2022-07-07 21:19:57 +00:00
buffers_config.j2 set cable length of backplane ports to 1m (#13279) 2023-02-21 22:14:53 +00:00
cbf_config.j2 [CBF] Added configuration templates to generate configs for CBF (#8689) 2021-10-29 17:18:57 -07:00
config-chassisdb.service.j2 [ChassisDB]: bring up ChassisDB service (#5283) 2020-10-14 15:15:24 -07:00
config-setup.service.j2 Add support for platform topology configuration service (#12066) (#13605) 2023-02-03 06:34:17 +08:00
database.service.j2 Multi-ASIC implementation (#3888) 2020-03-31 10:06:19 -07:00
dhcp_relay.service.j2 [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
docker_image_ctl.j2 [Mellanox][sai_failure_dump]Added platform specific script to be invoked during SAI failure dump (#13533) (#13749) 2023-02-10 09:23:10 -08:00
iccpd.service.j2 [services] introduce sonic.target (#5705) 2021-02-25 14:26:24 +02:00
init_cfg.json.j2 Added Support to runtime render bgp and teamd feature state and lldp has_asic_scope flag (#11796) (#12856) 2022-11-29 13:47:37 -08:00
kube_cni.10-flannel.conflist First cut image update for kubernetes support. (#5421) 2020-12-22 08:01:33 -08:00
lldp.service.j2 Changes for LLDP docker to support multi-npu platforms (#4530) 2020-05-11 11:05:44 -07:00
lldp.timer.j2 [Fastboot] Delay LLDP service for better fastboot performance (#10568) 2022-04-28 10:35:14 +03:00
manifest.json.j2 [dockers] change RPC, DBG dockers version: put RPG, DBG sign in build metadata part of the version (#8920) 2021-11-01 19:02:57 +02:00
mgmt-framework.service.j2 [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
mgmt-framework.timer Grouping delayed services under a target for config reload checks (#7846) 2021-06-21 11:55:02 -07:00
mux.service.j2 [mux] Exit to write standby state to active-active ports (#11821) 2022-09-01 00:11:09 +00:00
nat.service.j2 [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
organization_extensions.sh Framework to plugin Organization specific scripts during ONIE Image build (#951) 2017-09-19 16:23:31 -07:00
p4rt.service.j2 [PINS] Build P4RT container for PINS (#9083) 2021-12-07 11:11:25 -08:00
packages.json.j2 [sonic_debian_extension] fix packages.json generation and make the build fail when packages.json is not generated (#8044) 2021-07-09 12:29:33 -07:00
pde.service.j2 [PDE]: introduce the SONiC Platform Development Env (#7510) 2021-07-24 16:24:43 -07:00
pmon.service.j2 [Fastboot] Delay PMON service for better fastboot performance (#10567) 2022-05-02 10:44:17 +03:00
pmon.timer [Fastboot] Delay PMON service for better fastboot performance (#10567) 2022-05-02 10:44:17 +03:00
qos_config.j2 Apply separated DSCP_TO_TC_MAP and TC_TO_QUEUE_MAP to uplink ports on dualtor (#12730) 2022-11-28 18:51:04 +00:00
radv.service.j2 [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
restapi.service.j2 [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
sflow.service.j2 [hostcfgd] Configure service auto-restart in hostcfgd. (#5744) 2021-06-29 09:06:21 -07:00
snmp.service.j2 [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
snmp.timer Grouping delayed services under a target for config reload checks (#7846) 2021-06-21 11:55:02 -07:00
sonic_debian_extension.j2 [202205][Mellanox] Place FW binaries under platform directory instead of squashfs (#13838) 2023-02-22 17:40:50 +02:00
sonic_version.yml.j2 [Mellanox][asan] add address sanitizer support for syncd (#10266) 2022-04-14 15:00:32 -07:00
sonic-delayed.target Grouping delayed services under a target for config reload checks (#7846) 2021-06-21 11:55:02 -07:00
sonic.target [services] introduce sonic.target (#5705) 2021-02-25 14:26:24 +02:00
swss_vars.j2 [Mellanox] Support DSCP remapping in dual ToR topo on T0 switch (#12605) (#13745) 2023-02-10 09:16:56 -08:00
tacacs-config.service Add service to restore TACACS from old config (#7560) 2021-06-03 20:07:17 -07:00
tacacs-config.timer [202205] [services] Update "WantedBy=" section for tacacs-config.timer. (#11893) (#12080) 2022-09-19 09:20:10 +03:00
telemetry.service.j2 [services] kill container on stop in warm/fast mode (#10510) 2022-12-08 17:19:16 +00:00
telemetry.timer Grouping delayed services under a target for config reload checks (#7846) 2021-06-21 11:55:02 -07:00
updategraph.service.j2 [config-setup]: create a SONiC configuration management service (#3227) 2019-12-04 07:15:58 -08:00