From 7cfba1dd34ec86817e307a0189c72c3c464b9610 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Wed, 27 Dec 2017 20:46:37 +0200 Subject: [PATCH] [Mellanox]: Upgrade MFT package to 4.8.26 (#3) This version is compatible with Linux kernel 4.9 Signed-off-by: marian-pritsak --- platform/mellanox/mft.mk | 4 ++-- platform/mellanox/mft/Makefile | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index 2fb3af338d75..0164568dbc4f 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -1,9 +1,9 @@ # Mellanox SAI -MFT = mft-4.5.0-31.amd64.deb +MFT = mft-4.8.0-26.amd64.deb $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft $(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(MFT) -KERNEL_MFT = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb +KERNEL_MFT = kernel-mft-dkms_4.8.0-$(KVERSION)_all.deb $(eval $(call add_derived_package,$(MFT),$(KERNEL_MFT))) diff --git a/platform/mellanox/mft/Makefile b/platform/mellanox/mft/Makefile index eea78cd76031..47dd3c0c5cb2 100644 --- a/platform/mellanox/mft/Makefile +++ b/platform/mellanox/mft/Makefile @@ -1,12 +1,14 @@ .ONESHELL: SHELL = /bin/bash +.SHELLFLAGS += -e -MFT_NAME = mft-4.5.0-31-x86_64-deb +MFT_NAME = mft-4.8.0-26-x86_64-deb MFT_TGZ = $(MFT_NAME).tgz -SRC_DEB = kernel-mft-dkms_4.5.0-31_all.deb +KERNELVER = 4.9.0-5-amd64 +SRC_DEB = kernel-mft-dkms_4.8.0-26_all.deb -MAIN_TARGET = mft-4.5.0-31.amd64.deb -DERIVED_TARGETS = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb +MAIN_TARGET = mft-4.8.0-26.amd64.deb +DERIVED_TARGETS = kernel-mft-dkms_4.8.0-4.9.0-5-amd64_all.deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf $(MFT_NAME) @@ -17,15 +19,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # put a lock here because dpkg does not allow installing packages in parallel while true; do if mkdir $(DEST)/dpkg_lock &> /dev/null; then - { echo here && sudo dpkg -i $(SRC_DEB) && rm -d $(DEST)/dpkg_lock && break; } || { rm -d $(DEST)/dpkg_lock && exit 1 ; } + { sudo dpkg -i $(SRC_DEB) && rm -d $(DEST)/dpkg_lock && break; } || { rm -d $(DEST)/dpkg_lock && exit 1 ; } fi done - tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k $(KVERSION) --media tar | grep "Disk image location" | cut -d':' -f2` + tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.8.0 -a all -d ubuntu -k $(KERNELVER) --media tar | grep "Disk image location" | cut -d':' -f2` popd # fix timestamp because we do not actually build tools, only kernel touch $(MFT_NAME)/DEBS/$* - mv $(MFT_NAME)/SDEBS/ubuntu-drivers/3.16.0/$(DERIVED_TARGETS) $(MFT_NAME)/DEBS/$* $(DEST) + mv $(MFT_NAME)/SDEBS/ubuntu-drivers/4.9.0/$(DERIVED_TARGETS) $(MFT_NAME)/DEBS/$* $(DEST) $(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)