Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mellanox] Update SDK/FW/SAI to 4.6.1020/2012.1020/SAIBuild2305.25.0.3 #16096

Merged
merged 4 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,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/
Expand Down
4 changes: 4 additions & 0 deletions platform/mellanox/fw.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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)
20 changes: 13 additions & 7 deletions platform/mellanox/fw.mk
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -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)
Expand All @@ -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
19 changes: 19 additions & 0 deletions platform/mellanox/mlnx-fw-upgrade.j2
Original file line number Diff line number Diff line change
@@ -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")"
Expand Down Expand Up @@ -28,13 +41,15 @@ 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"

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}"
Expand Down Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/mlnx-sai.mk
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
29 changes: 29 additions & 0 deletions platform/mellanox/sdk-src/sx-obj-desc-lib/Makefile
Original file line number Diff line number Diff line change
@@ -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)
38 changes: 17 additions & 21 deletions platform/mellanox/sdk.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
42 changes: 22 additions & 20 deletions platform/mellanox/sdk.mk
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)))
Expand Down