diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 3b40bd87774e..e12ac17b66fb 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -327,8 +327,11 @@ sudo cp {{src}} $FILESYSTEM_ROOT/{{dst}} {% endfor -%} {% if sonic_asic_platform == "mellanox" %} -sudo mkdir -p $FILESYSTEM_ROOT/etc/mlnx/ +sudo mkdir -p $FILESYSTEM_ROOT/etc/mlnx/cpld/ sudo cp target/files/$MLNX_FW_FILE $FILESYSTEM_ROOT/etc/mlnx/fw-SPC.mfa +for MLNX_CPLD_ARCHIVE in $MLNX_CPLD_ARCHIVES; do + sudo cp target/files/$MLNX_CPLD_ARCHIVE $FILESYSTEM_ROOT/etc/mlnx/cpld/ +done sudo cp target/files/$ISSU_VERSION_FILE $FILESYSTEM_ROOT/etc/mlnx/issu-version sudo cp target/files/$MLNX_FFB_SCRIPT $FILESYSTEM_ROOT/usr/bin/mlnx-ffb.sh j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $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..0a03b3c54a9f --- /dev/null +++ b/platform/mellanox/cpld.mk @@ -0,0 +1,9 @@ +# 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..81d99d04dda6 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 6fd5af193276..d930850b7ac7 100644 --- a/platform/mellanox/one-image.mk +++ b/platform/mellanox/one-image.mk @@ -5,5 +5,5 @@ $(SONIC_ONE_IMAGE)_MACHINE = mellanox $(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie $(SONIC_ONE_IMAGE)_INSTALLS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT_OEM) $(MFT) $(MLNX_HW_MANAGEMENT) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) -$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FW_FILE) $(MLNX_FFB_SCRIPT) $(ISSU_VERSION_FILE) +$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FW_FILE) $(MLNX_CPLD_ARCHIVES) $(MLNX_FFB_SCRIPT) $(ISSU_VERSION_FILE) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index afd52a3459b1..3ed1f1bae042 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -1,4 +1,5 @@ include $(PLATFORM_PATH)/sdk.mk +include $(PLATFORM_PATH)/cpld.mk include $(PLATFORM_PATH)/fw.mk include $(PLATFORM_PATH)/mft.mk include $(PLATFORM_PATH)/mlnx-sai.mk