[Mellanox] Enhance MFT make file to download source code from any valid URL (#13801)
- Why I did it Currently, when building MFT, it can only download the source code from the official download site: http://www.mellanox.com/downloads/MFT/, it's not possible to integrate an internal version that has not been officially released yet. The intention of this PR is to make it possible to download the source code from any valid link. - How I did it Add a new parameter "MLNX_MFT_INTERNAL_SOURCE_BASE_URL", if an URL is given, it will download the source code from the given URL, otherwise, it downloads from the default official site. - How to verify it Specify a valid URL in the make file, the MFT debs should be built successfully. Signed-off-by: Kebo Liu <kebol@nvidia.com>
This commit is contained in:
parent
e673c1dcaf
commit
aee97a69c6
@ -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
|
||||
|
@ -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
|
||||
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user