diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index c5a93b98a2..083114d44d 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -909,6 +909,7 @@ declare -rA FW_FILE_MAP=( \ [$MLNX_SPC_FW_FILE]="fw-SPC.mfa" \ [$MLNX_SPC2_FW_FILE]="fw-SPC2.mfa" \ [$MLNX_SPC3_FW_FILE]="fw-SPC3.mfa" \ + [$MLNX_SPC4_FW_FILE]="fw-SPC4.mfa" \ ) sudo mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR/fw/asic/ sudo mkdir -p $FILESYSTEM_ROOT_ETC/mlnx/ diff --git a/platform/mellanox/fw.dep b/platform/mellanox/fw.dep index 228f6dc87e..f57bad8eb9 100644 --- a/platform/mellanox/fw.dep +++ b/platform/mellanox/fw.dep @@ -14,3 +14,7 @@ $(MLNX_SPC2_FW_FILE)_DEP_FILES := $(DEP_FILES) $(MLNX_SPC3_FW_FILE)_CACHE_MODE := GIT_CONTENT_SHA $(MLNX_SPC3_FW_FILE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(MLNX_SPC3_FW_FILE)_DEP_FILES := $(DEP_FILES) + +$(MLNX_SPC4_FW_FILE)_CACHE_MODE := GIT_CONTENT_SHA +$(MLNX_SPC4_FW_FILE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(MLNX_SPC4_FW_FILE)_DEP_FILES := $(DEP_FILES) diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 9cde768bd1..e449c56e95 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,33 +21,38 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH) # Place an URL here to FW if you want to download FW instead MLNX_FW_BASE_URL = -SIMX_VERSION = 23.4-1072 +SIMX_VERSION = 23.7-1086 FW_FROM_URL = y -MLNX_FW_ASSETS_RELEASE_TAG = fw-2010.5144 +MLNX_FW_ASSETS_RELEASE_TAG = fw-2012.1020 MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG) ifeq ($(MLNX_FW_BASE_URL), ) MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL) endif -MLNX_SPC_FW_VERSION = 13.2010.5144 +MLNX_SPC_FW_VERSION = 13.2012.1020 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2010.5144 +MLNX_SPC2_FW_VERSION = 29.2012.1020 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2010.5144 +MLNX_SPC3_FW_VERSION = 30.2012.1020 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) -MLNX_FW_FILES = $(MLNX_SPC_FW_FILE) $(MLNX_SPC2_FW_FILE) $(MLNX_SPC3_FW_FILE) +MLNX_SPC4_FW_VERSION = 34.2012.1020 +MLNX_SPC4_FW_FILE = fw-SPC4-rel-$(subst .,_,$(MLNX_SPC4_FW_VERSION))-EVB.mfa +$(MLNX_SPC4_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) +$(MLNX_SPC4_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC4_FW_FILE) + +MLNX_FW_FILES = $(MLNX_SPC_FW_FILE) $(MLNX_SPC2_FW_FILE) $(MLNX_SPC3_FW_FILE) $(MLNX_SPC4_FW_FILE) ifeq ($(FW_FROM_URL),n) SONIC_COPY_FILES += $(MLNX_FW_FILES) @@ -60,3 +65,4 @@ MLNX_FILES += $(MLNX_FW_FILES) export MLNX_SPC_FW_FILE export MLNX_SPC2_FW_FILE export MLNX_SPC3_FW_FILE +export MLNX_SPC4_FW_FILE diff --git a/platform/mellanox/mlnx-fw-upgrade.j2 b/platform/mellanox/mlnx-fw-upgrade.j2 index 676d07cf3e..9a73d78eb8 100755 --- a/platform/mellanox/mlnx-fw-upgrade.j2 +++ b/platform/mellanox/mlnx-fw-upgrade.j2 @@ -1,3 +1,16 @@ +{#- + Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. + 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. +-#} #!/bin/bash declare -r SCRIPT_NAME="$(basename "$0")" @@ -28,6 +41,7 @@ declare -r LIST_CONTENT_FILE="/tmp/mlxfwmanager-list-content.log" declare -r SPC1_ASIC="spc1" declare -r SPC2_ASIC="spc2" declare -r SPC3_ASIC="spc3" +declare -r SPC4_ASIC="spc4" declare -r UNKN_ASIC="unknown" declare -r UNKN_MST="unknown" @@ -35,6 +49,7 @@ declare -rA FW_FILE_MAP=( \ [$SPC1_ASIC]="fw-SPC.mfa" \ [$SPC2_ASIC]="fw-SPC2.mfa" \ [$SPC3_ASIC]="fw-SPC3.mfa" \ + [$SPC4_ASIC]="fw-SPC4.mfa" \ ) IMAGE_UPGRADE="${NO_PARAM}" @@ -160,6 +175,7 @@ function GetAsicType() { local -r SPC1_PRODUCT_ID="cb84" local -r SPC2_PRODUCT_ID="cf6c" local -r SPC3_PRODUCT_ID="cf70" + local -r SPC4_PRODUCT_ID="cf80" if lspci -n | grep "${VENDOR_ID}:${SPC1_PRODUCT_ID}" &>/dev/null; then echo "${SPC1_ASIC}" @@ -170,6 +186,9 @@ function GetAsicType() { elif lspci -n | grep "${VENDOR_ID}:${SPC3_PRODUCT_ID}" &>/dev/null; then echo "${SPC3_ASIC}" exit "${EXIT_SUCCESS}" + elif lspci -n | grep "${VENDOR_ID}:${SPC4_PRODUCT_ID}" &>/dev/null; then + echo "${SPC4_ASIC}" + exit "${EXIT_SUCCESS}" fi echo "${UNKN_ASIC}" diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk index 1c07186161..39015f758f 100644 --- a/platform/mellanox/mlnx-sai.mk +++ b/platform/mellanox/mlnx-sai.mk @@ -1,6 +1,6 @@ # Mellanox SAI -MLNX_SAI_VERSION = SAIBuild2305.24.0.1 +MLNX_SAI_VERSION = SAIBuild2305.25.0.3 MLNX_SAI_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins MLNX_SAI_ASSETS_RELEASE_TAG = sai-$(MLNX_SAI_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH) MLNX_SAI_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SAI_ASSETS_RELEASE_TAG) diff --git a/platform/mellanox/sdk-src/sx-obj-desc-lib/Makefile b/platform/mellanox/sdk-src/sx-obj-desc-lib/Makefile new file mode 100644 index 0000000000..26d1f65ca7 --- /dev/null +++ b/platform/mellanox/sdk-src/sx-obj-desc-lib/Makefile @@ -0,0 +1,29 @@ +.ONESHELL: +SHELL = /bin/bash + +MAIN_TARGET = sx-obj-desc-lib_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb +DERIVED_TARGETS = sx-obj-desc-lib-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb \ + sx-obj-desc-lib-dev-static_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb \ + sx-obj-desc-lib-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb +PACKAGE_NAME = sx_obj_desc_lib + +$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : + # get sources + rm -rf $(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION) + + wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz + + # build + pushd $(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION) + + if [ -f autogen.sh ]; then + ./autogen.sh + fi + + debuild -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) + + popd + + mv $(DERIVED_TARGETS) $* $(DEST)/ + +$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) diff --git a/platform/mellanox/sdk.dep b/platform/mellanox/sdk.dep index e5be175286..122548192c 100644 --- a/platform/mellanox/sdk.dep +++ b/platform/mellanox/sdk.dep @@ -94,27 +94,6 @@ $(SX_GEN_UTILS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) $(SX_GEN_UTILS_DBGSYM)_DEP_FILES := $(DEP_FILES) endif -# SX_SCEW - -SPATH := $($(SX_SCEW)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files -- $(SPATH)) - -$(SX_SCEW)_CACHE_MODE := GIT_CONTENT_SHA -$(SX_SCEW)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) -$(SX_SCEW)_DEP_FILES := $(DEP_FILES) - -$(SX_SCEW_DEV)_CACHE_MODE := GIT_CONTENT_SHA -$(SX_SCEW_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) -$(SX_SCEW_DEV)_DEP_FILES := $(DEP_FILES) - -ifeq ($(SDK_FROM_SRC),y) -$(SX_SCEW_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA -$(SX_SCEW_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) -$(SX_SCEW_DBGSYM)_DEP_FILES := $(DEP_FILES) -endif - # SXD_LIBS SPATH := $($(SXD_LIBS)_SRC_PATH) @@ -212,6 +191,23 @@ $(SX_HASH_CALC_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) $(SX_HASH_CALC_DBGSYM)_DEP_FILES := $(DEP_FILES) endif +# SX_OBJ_DESC_LIB + +SPATH := $($(SX_OBJ_DESC_LIB)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files -- $(SPATH)) + +$(SX_OBJ_DESC_LIB)_CACHE_MODE := GIT_CONTENT_SHA +$(SX_OBJ_DESC_LIB)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) +$(SX_OBJ_DESC_LIB)_DEP_FILES := $(DEP_FILES) + +ifeq ($(SDK_FROM_SRC),y) +$(SX_OBJ_DESC_LIB_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA +$(SX_OBJ_DESC_LIB_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST) +$(SX_OBJ_DESC_LIB_DBGSYM)_DEP_FILES := $(DEP_FILES) +endif + # SX_KERNEL SPATH := $($(SX_KERNEL)_SRC_PATH) diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index 8a22444e44..69a28c2477 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -MLNX_SDK_VERSION = 4.5.5142 +MLNX_SDK_VERSION = 4.6.1020 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DRIVERS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers @@ -35,18 +35,18 @@ endif export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION MLNX_ASSETS_GITHUB_URL MLNX_SDK_DRIVERS_GITHUB_URL MLNX_SDK_RDEBS += $(APPLIBS) $(SX_COMPLIB) $(SX_EXAMPLES) \ - $(SX_GEN_UTILS) $(SX_SCEW) $(SXD_LIBS) $(WJH_LIBS) $(SX_ACL_HELPER) \ - $(SX_HASH_CALC) + $(SX_GEN_UTILS) $(SXD_LIBS) $(WJH_LIBS) $(SX_ACL_HELPER) \ + $(SX_HASH_CALC) $(SX_OBJ_DESC_LIB) MLNX_SDK_DEBS += $(APPLIBS_DEV) $(SX_COMPLIB_DEV) \ $(SX_COMPLIB_DEV_STATIC) $(SX_EXAMPLES_DEV) $(SX_GEN_UTILS_DEV) \ - $(SX_SCEW_DEV) $(SX_SCEW_DEV_STATIC) $(SXD_LIBS_DEV)\ - $(SXD_LIBS_DEV_STATIC) $(WJH_LIBS_DEV) $(SX_ACL_HELPER_DEV) $(SX_HASH_CALC) + $(SXD_LIBS_DEV) $(SXD_LIBS_DEV_STATIC) $(WJH_LIBS_DEV) $(SX_ACL_HELPER_DEV) \ + $(SX_HASH_CALC) $(SX_OBJ_DESC_LIB_DEV) MLNX_SDK_DBG_DEBS += $(APPLIBS_DBGSYM) $(SX_COMPLIB_DBGSYM) \ - $(SX_EXAMPLES_DBGSYM) $(SX_GEN_UTILS_DBGSYM) $(SX_SCEW_DBGSYM) \ + $(SX_EXAMPLES_DBGSYM) $(SX_GEN_UTILS_DBGSYM) \ $(SXD_LIBS_DBGSYM) $(WJH_LIBS_DBGSYM) $(SX_ACL_HELPER_DBGSYM) \ - $(SX_HASH_CALC_DBGSYM) + $(SX_HASH_CALC_DBGSYM) $(SX_OBJ_DESC_LIB_DBGSYM) APPLIBS = applibs_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(APPLIBS)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/applibs @@ -70,8 +70,8 @@ endif SX_EXAMPLES = sx-examples_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(SX_EXAMPLES)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-examples -$(SX_EXAMPLES)_DEPENDS += $(APPLIBS_DEV) $(SX_SCEW_DEV) $(SXD_LIBS_DEV) -$(SX_EXAMPLES)_RDEPENDS += $(APPLIBS) $(SX_SCEW) $(SXD_LIBS) +$(SX_EXAMPLES)_DEPENDS += $(APPLIBS_DEV) $(SXD_LIBS_DEV) +$(SX_EXAMPLES)_RDEPENDS += $(APPLIBS) $(SXD_LIBS) SX_EXAMPLES_DEV = sx-examples-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(SX_EXAMPLES),$(SX_EXAMPLES_DEV))) SX_EXAMPLES_DBGSYM = sx-examples-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb @@ -90,15 +90,6 @@ ifeq ($(SDK_FROM_SRC),y) $(eval $(call add_derived_package,$(SX_GEN_UTILS),$(SX_GEN_UTILS_DBGSYM))) endif -SX_SCEW = sx-scew_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb -$(SX_SCEW)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-scew -SX_SCEW_DEV = sx-scew-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(SX_SCEW),$(SX_SCEW_DEV))) -SX_SCEW_DBGSYM = sx-scew-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb -ifeq ($(SDK_FROM_SRC),y) -$(eval $(call add_derived_package,$(SX_SCEW),$(SX_SCEW_DBGSYM))) -endif - SXD_LIBS = sxd-libs_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(SXD_LIBS)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sxd-libs $(SXD_LIBS)_DEPENDS += $(SX_COMPLIB_DEV) $(SX_GEN_UTILS_DEV) @@ -130,9 +121,20 @@ ifeq ($(SDK_FROM_SRC),y) $(eval $(call add_derived_package,$(SX_ACL_HELPER),$(SX_ACL_HELPER_DBGSYM))) endif +SX_OBJ_DESC_LIB = sx-obj-desc-lib_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb +$(SX_OBJ_DESC_LIB)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-obj-desc-lib +$(SX_OBJ_DESC_LIB)_DEPENDS += $(APPLIBS_DEV) $(SX_COMPLIB_DEV) $(SXD_LIBS_DEV) +$(SX_OBJ_DESC_LIB)_RDEPENDS += $(APPLIBS) $(SX_COMPLIB) $(PYTHON_SDK_API) +SX_OBJ_DESC_LIB_DEV = sx-obj-desc-lib-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(SX_OBJ_DESC_LIB),$(SX_OBJ_DESC_LIB_DEV))) +SX_OBJ_DESC_LIB_DBGSYM = sx-obj-desc-lib-dbgsym_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb +ifeq ($(SDK_FROM_SRC),y) +$(eval $(call add_derived_package,$(SX_OBJ_DESC_LIB),$(SX_OBJ_DESC_LIB_DBGSYM))) +endif + WJH_LIBS = wjh-libs_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(WJH_LIBS)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/wjh-libs -$(WJH_LIBS)_DEPENDS += $(SX_COMPLIB_DEV) $(SXD_LIBS_DEV) $(APPLIBS_DEV) $(SX_ACL_HELPER_DEV) $(SX_SCEW_DEV) +$(WJH_LIBS)_DEPENDS += $(SX_COMPLIB_DEV) $(SXD_LIBS_DEV) $(APPLIBS_DEV) $(SX_ACL_HELPER_DEV) $(WJH_LIBS)_RDEPENDS += $(SX_COMPLIB) $(PYTHON_SDK_API) $(SX_ACL_HELPER) WJH_LIBS_DEV = wjh-libs-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(WJH_LIBS),$(WJH_LIBS_DEV)))