sonic-buildimage/platform/mellanox/sdk.dep
Lior Avramov 2922f26b6c
[Mellanox] Replace iproute2 supplied by SDK to iproute2 downloaded from Debian repository (#14726)
- Why I did it
Mellanox syncd container will be based on Debian iproute2 plus patches instead of Nvidia internal version of iproute2

- How I did it
Download iproute2 from Debian repository, apply patches and compile to create a new target.
The target is then deployed in syncd container of Mellanox switches only.
The new target is called IPROUTE2_MLNX.

- How to verify it
Compile and load on switch, verify interfaces network devices created successfully.
Verify LLDP shows connections to neighbors.
Verify ping between 2 hosts over 2 router ports is successful.
2023-04-30 12:30:09 +03:00

236 lines
8.5 KiB
Plaintext

# DPKG FRK
# Append MLNX_SDK_DEB_VERSION to flags list.
# We use SONIC_OVERRIDE_BUILD_VARS in order to build SONiC with any SDK we want
# by passing it in environment variable. This approach does not work well with
# caching framework which assumes that if the corresponding makefile didn't change
# the version didn't change neither. There is no ultimate solution to support
# caching and anything user can pass in SONIC_OVERRIDE_BUILD_VARS, so as a W/A
# we append MLNX_SDK_DEB_VERSION to flags to invalidate cache in case we use
# SONIC_OVERRIDE_BUILD_VARS.
MLNX_SDK_COMMON_FLAGS_LIST = $(SONIC_COMMON_FLAGS_LIST) $(MLNX_SDK_DEB_VERSION)
# APPLIBS
SPATH := $($(APPLIBS)_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))
$(APPLIBS)_CACHE_MODE := GIT_CONTENT_SHA
$(APPLIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(APPLIBS)_DEP_FILES := $(DEP_FILES)
$(APPLIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(APPLIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(APPLIBS_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(APPLIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(APPLIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(APPLIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_COMPLIB
SPATH := $($(SX_COMPLIB)_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_COMPLIB)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_COMPLIB)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_COMPLIB)_DEP_FILES := $(DEP_FILES)
$(SX_COMPLIB_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_COMPLIB_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_COMPLIB_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SX_COMPLIB_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_COMPLIB_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_COMPLIB_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_EXAMPLES
SPATH := $($(SX_EXAMPLES)_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_EXAMPLES)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_EXAMPLES)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_EXAMPLES)_DEP_FILES := $(DEP_FILES)
$(SX_EXAMPLES_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_EXAMPLES_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_EXAMPLES_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SX_EXAMPLES_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_EXAMPLES_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_EXAMPLES_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_GEN_UTILS
SPATH := $($(SX_GEN_UTILS)_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_GEN_UTILS)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_GEN_UTILS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_GEN_UTILS)_DEP_FILES := $(DEP_FILES)
$(SX_GEN_UTILS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_GEN_UTILS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_GEN_UTILS_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SX_GEN_UTILS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(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)
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))
$(SXD_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
$(SXD_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SXD_LIBS)_DEP_FILES := $(DEP_FILES)
$(SXD_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SXD_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SXD_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SXD_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(SXD_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SXD_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# PYTHON_SDK_API
SPATH := $($(PYTHON_SDK_API)_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))
$(PYTHON_SDK_API)_CACHE_MODE := GIT_CONTENT_SHA
$(PYTHON_SDK_API)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(PYTHON_SDK_API)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(PYTHON_SDK_API_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(PYTHON_SDK_API_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(PYTHON_SDK_API_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_ACL_HELPER
SPATH := $($(SX_ACL_HELPER)_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_ACL_HELPER)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_ACL_HELPER)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_ACL_HELPER)_DEP_FILES := $(DEP_FILES)
$(SX_ACL_HELPER_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_ACL_HELPER_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_ACL_HELPER_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SX_ACL_HELPER_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_ACL_HELPER_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_ACL_HELPER_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# WJH_LIBS
SPATH := $($(WJH_LIBS)_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))
$(WJH_LIBS)_CACHE_MODE := GIT_CONTENT_SHA
$(WJH_LIBS)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(WJH_LIBS)_DEP_FILES := $(DEP_FILES)
$(WJH_LIBS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(WJH_LIBS_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(WJH_LIBS_DEV)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(WJH_LIBS_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(WJH_LIBS_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(WJH_LIBS_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_HASH_CALC
SPATH := $($(SX_HASH_CALC)_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_HASH_CALC)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_HASH_CALC)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_HASH_CALC)_DEP_FILES := $(DEP_FILES)
ifeq ($(SDK_FROM_SRC),y)
$(SX_HASH_CALC_DBGSYM)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_HASH_CALC_DBGSYM)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_HASH_CALC_DBGSYM)_DEP_FILES := $(DEP_FILES)
endif
# SX_KERNEL
SPATH := $($(SX_KERNEL)_SRC_PATH)
SLINKS := $(shell find $(SPATH) -type l -exec echo {} \; | grep -Ev ' ')
SMDEP_PATHS := $(shell git submodule status --recursive -- $(SPATH) | awk '{print $$2}' | grep -Ev ' ')
SMDEP_FILES := $(foreach path,$(SMDEP_PATHS),$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/,$(shell cd $(path) && git ls-files | grep -Ev ' '))))
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/sdk.mk $(PLATFORM_PATH)/sdk.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(filter-out $(SMDEP_PATHS),$(shell git ls-files -- $(SPATH) | grep -Ev ' '))
$(SX_KERNEL)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_KERNEL)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_KERNEL)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
$(SX_KERNEL)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
$(SX_KERNEL)_SMDEP_PATHS := $(SMDEP_PATHS)
$(SX_KERNEL_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(SX_KERNEL_DEV)_DEP_FLAGS := $(MLNX_SDK_COMMON_FLAGS_LIST)
$(SX_KERNEL_DEV)_DEP_FILES := $(filter-out $(SLINKS),$(DEP_FILES))
$(SX_KERNEL_DEV)_SMDEP_FILES := $(filter-out $(SLINKS),$(SMDEP_FILES))
$(SX_KERNEL_DEV)_SMDEP_PATHS := $(SMDEP_PATHS)