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] Enhance MFT make file to download source code from any valid URL #13801

Merged
merged 1 commit into from
Feb 16, 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
10 changes: 9 additions & 1 deletion platform/mellanox/mft.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
MFT_VERSION = 4.21.0
MFT_REVISION = 100

export MFT_VERSION MFT_REVISION
MLNX_MFT_INTERNAL_SOURCE_BASE_URL =

ifneq ($(MLNX_MFT_INTERNAL_SOURCE_BASE_URL), )
MFT_FROM_INTERNAL = y
else
MFT_FROM_INTERNAL = n
endif

export MFT_VERSION MFT_REVISION MFT_FROM_INTERNAL MLNX_MFT_INTERNAL_SOURCE_BASE_URL

MFT = mft_$(MFT_VERSION)-$(MFT_REVISION)_$(CONFIGURED_ARCH).deb
$(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft
Expand Down
8 changes: 7 additions & 1 deletion platform/mellanox/mft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ endif
MFT_NAME = mft-$(MFT_VERSION)-$(MFT_REVISION)-$(MFT_ARCH)-deb
MFT_TGZ = $(MFT_NAME).tgz

ifeq ($(MFT_FROM_INTERNAL),y)
MFT_TGZ_URL = $(MLNX_MFT_INTERNAL_SOURCE_BASE_URL)$(MFT_TGZ)
else
MFT_TGZ_URL = http://www.mellanox.com/downloads/MFT/$(MFT_TGZ)
endif

SRC_DEB = kernel-mft-dkms_$(MFT_VERSION)-$(MFT_REVISION)_all.deb
MOD_DEB = kernel-mft-dkms-modules-$(KVERSION)_$(MFT_VERSION)_$(CONFIGURED_ARCH).deb

Expand All @@ -38,7 +44,7 @@ DKMS_TMP := $(shell mktemp -u -d -t dkms.XXXXXXXXXX)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf $(MFT_NAME)
wget -O $(MFT_TGZ) http://www.mellanox.com/downloads/MFT/$(MFT_TGZ)
wget -O $(MFT_TGZ) $(MFT_TGZ_URL)
tar xzf $(MFT_TGZ)

pushd $(MFT_NAME)/SDEBS
Expand Down