diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 8f8af4a7a17e..2c76c13f9648 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -975,6 +975,10 @@ sudo cp $files_path/$MLNX_SSD_FW_UPDATE $FILESYSTEM_ROOT/usr/bin/$MLNX_SSD_FW_UP sudo cp $files_path/$MLNX_INSTALL_PENDING_FW $FILESYSTEM_ROOT/usr/bin/$MLNX_INSTALL_PENDING_FW sudo cp platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py +sudo mkdir -p $FILESYSTEM_ROOT/etc/mlnx/cpld/ +for MLNX_CPLD_ARCHIVE in $MLNX_CPLD_ARCHIVES; do + sudo cp $files_path/$MLNX_CPLD_ARCHIVE $FILESYSTEM_ROOT/etc/mlnx/cpld/ +done j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh diff --git a/platform/mellanox/cpld.mk b/platform/mellanox/cpld.mk new file mode 100644 index 000000000000..33f7047630c8 --- /dev/null +++ b/platform/mellanox/cpld.mk @@ -0,0 +1,24 @@ +# +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# mellanox cpld firmware +MLNX_SN2700_CPLD_ARCHIVE = msn2700_cpld.tar.gz +$(MLNX_SN2700_CPLD_ARCHIVE)_PATH = platform/mellanox/cpld/ +SONIC_COPY_FILES += $(MLNX_SN2700_CPLD_ARCHIVE) +MLNX_CPLD_ARCHIVES += $(MLNX_SN2700_CPLD_ARCHIVE) +export MLNX_CPLD_ARCHIVES diff --git a/platform/mellanox/cpld/msn2700_cpld.tar.gz b/platform/mellanox/cpld/msn2700_cpld.tar.gz new file mode 100644 index 000000000000..2d68694452c2 Binary files /dev/null and b/platform/mellanox/cpld/msn2700_cpld.tar.gz differ diff --git a/platform/mellanox/one-image.mk b/platform/mellanox/one-image.mk index 74365cfea430..d132a0902fed 100644 --- a/platform/mellanox/one-image.mk +++ b/platform/mellanox/one-image.mk @@ -1,5 +1,6 @@ # -# Copyright (c) 2017-2023 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # 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 else $(SONIC_ONE_IMAGE)_DOCKERS = $(SONIC_INSTALL_DOCKER_IMAGES) endif -$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FILES) +$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FILES) $(MLNX_CPLD_ARCHIVES) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index 654c6b65ab4f..21d72bd76862 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -1,5 +1,6 @@ # -# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES +# Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +16,7 @@ # limitations under the License. # include $(PLATFORM_PATH)/sdk.mk +include $(PLATFORM_PATH)/cpld.mk include $(PLATFORM_PATH)/fw.mk include $(PLATFORM_PATH)/mft.mk include $(PLATFORM_PATH)/mft-fwtrace-cfg.mk