Skip to content

Commit 8231cbf

Browse files
[202311][Mellanox]Add CPLD update (#20459)
* [sn2700]: Add CPLD update. (#17376) Why I did it Porting #12173 to master, this will ensure all above 201911 version will have CPLD update files. Microsoft ADO 25846069: How I did it Added Mellanox CPLD burn/refresh vme bundle for SN2700 platforms How to verify it Using update_firmware script to install private image that contains CPLD VME files with UPDATE_MLNX_CPLD_FW parameter. Before update, the CPLD version was 15 admin@str2-msn2700-spy-1:~$ sudo fwutil show status Chassis Module Component Version Description --------- -------- ----------- --------------------- ---------------------------------------- MSN2700 N/A ONIE 2016.11-5.1.0012-9600 ONIE - Open Network Install Environment SSD 0115-000 SSD - Solid-State Drive BIOS 0ABZS017_01.01.213 BIOS - Basic Input/Output System CPLD1 CPLD000085_REV1501 CPLD - Complex Programmable Logic Device CPLD2 CPLD000043_REV0400 CPLD - Complex Programmable Logic Device CPLD3 CPLD000000_REV0100 CPLD - Complex Programmable Logic Device Do Update admin@str2-msn2700-spy-1:/tmp$ sudo ./update_firmware sonic-mellanox-xincun-cpld.bin UPDATE_MLNX_CPLD_FW=1 Available space: 8101 MB Warning: 'sonic_installer' command is deprecated and will be removed in the future Please use 'sonic-installer' instead Current FW version: SONiC-OS-20201231.110 Target FW version number: add-cpld-2.83464431-a0237f7aef Target FW version: SONiC-OS-add-cpld-2.83464431-a0237f7aef expr: non-integer argument NOTICE: Reset Drop caches to index 1 Warning: 'sonic_installer' command is deprecated and will be removed in the future Please use 'sonic-installer' instead Image SONiC-OS-add-cpld-2.83464431-a0237f7aef is already installed. Setting it as default... Command: grub-set-default --boot-directory=/host 0 Command: sync;sync;sync Command: sleep 3 Done NOTICE: sonic_installer install successfully Mellanox platform is detected: x86_64-mlnx_msn2700-r0 Mellanox ASIC maintenance... Mellanox ASIC firmware is up to date Mellanox CPLD maintenance... NOTICE: Copy Mellanox firmware upgrade utility '/tmp/image-add-cpld-2.83464431-a0237f7aef-fs//usr/bin/mlnx-fw-upgrade.sh' -> '/usr/bin/mlnx-fw-upgrade.sh' NOTICE: Copy Mellanox cpldupdate utility '/tmp/image-add-cpld-2.83464431-a0237f7aef-fs//usr/bin/cpldupdate' -> '/usr/bin/cpldupdate' Mellanox CPLD firmware upgrade is required. Installing compatible version... Current CPLD firmware version: 15 Target CPLD firmware version: 20 NOTICE: Upgrade MLNX CPLD FW from 15 to 20 CPLD burn firmware file: /tmp/tmp.42DXmW1pQS/FUI000193_Burn_Panther_CPLD000085_REV2000_CPLD000128_REV0600_CPLD000130_REV0300.vme CPLD refresh firmware file: /tmp/tmp.42DXmW1pQS/FUI000193_Refresh_Panther_CPLD000085_REV2000_CPLD000128_REV0600_CPLD000130_REV0300.vme [/] CPLD update... Lattice Semiconductor Corp. ispVME(tm) V12.2 Copyright 1998-2012. Customized for Mellanox products. Processing virtual machine file (/tmp/tmp.42DXmW1pQS/FUI000193_Burn_Panther_CPLD000085_REV2000_CPLD000128_REV0600_CPLD000130_REV0300.vme)...... Diamond Deployment Tool 3.12 CREATION DATE: Tue Sep 20 09:41:49 2022 [|] CPLD update...+=======+ | PASS! | +=======+ Power cycle the device, then check CPLD version, it has changed to 20. admin@str2-msn2700-spy-1:~$ sudo fwutil show status Chassis Module Component Version Description --------- -------- ----------- --------------------- ---------------------------------------- MSN2700 N/A ONIE 2016.11-5.1.0012-9600 ONIE - Open Network Install Environment SSD 0115-000 SSD - Solid-State Drive BIOS 0ABZS017_01.01.213 BIOS - Basic Input/Output System CPLD1 CPLD000085_REV2000 CPLD - Complex Programmable Logic Device CPLD2 CPLD000128_REV0600 CPLD - Complex Programmable Logic Device CPLD3 CPLD000000_REV0000 CPLD - Complex Programmable Logic Device * Fixing header check --------- Co-authored-by: Xincun Li <[email protected]>
1 parent 6395ac0 commit 8231cbf

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

files/build_templates/sonic_debian_extension.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,10 @@ sudo cp $files_path/$MLNX_SSD_FW_UPDATE $FILESYSTEM_ROOT/usr/bin/$MLNX_SSD_FW_UP
975975
sudo cp $files_path/$MLNX_INSTALL_PENDING_FW $FILESYSTEM_ROOT/usr/bin/$MLNX_INSTALL_PENDING_FW
976976
sudo cp platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py
977977
sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py
978+
sudo mkdir -p $FILESYSTEM_ROOT/etc/mlnx/cpld/
979+
for MLNX_CPLD_ARCHIVE in $MLNX_CPLD_ARCHIVES; do
980+
sudo cp $files_path/$MLNX_CPLD_ARCHIVE $FILESYSTEM_ROOT/etc/mlnx/cpld/
981+
done
978982
j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh
979983
sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh
980984

platform/mellanox/cpld.mk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3+
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# mellanox cpld firmware
20+
MLNX_SN2700_CPLD_ARCHIVE = msn2700_cpld.tar.gz
21+
$(MLNX_SN2700_CPLD_ARCHIVE)_PATH = platform/mellanox/cpld/
22+
SONIC_COPY_FILES += $(MLNX_SN2700_CPLD_ARCHIVE)
23+
MLNX_CPLD_ARCHIVES += $(MLNX_SN2700_CPLD_ARCHIVE)
24+
export MLNX_CPLD_ARCHIVES
279 KB
Binary file not shown.

platform/mellanox/one-image.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
2-
# Copyright (c) 2017-2023 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3+
# Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
34
# Apache-2.0
45
#
56
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,5 +28,5 @@ $(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.g
2728
else
2829
$(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_IMAGES)
2930
endif
30-
$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FILES)
31+
$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FILES) $(MLNX_CPLD_ARCHIVES)
3132
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)

platform/mellanox/rules.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
2-
# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3+
# Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
34
# Apache-2.0
45
#
56
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,6 +16,7 @@
1516
# limitations under the License.
1617
#
1718
include $(PLATFORM_PATH)/sdk.mk
19+
include $(PLATFORM_PATH)/cpld.mk
1820
include $(PLATFORM_PATH)/fw.mk
1921
include $(PLATFORM_PATH)/mft.mk
2022
include $(PLATFORM_PATH)/mft-fwtrace-cfg.mk

0 commit comments

Comments
 (0)