From 9413701b85fb118f3dd0e85096a4bb6408a520e5 Mon Sep 17 00:00:00 2001 From: marian-pritsak Date: Wed, 24 Jan 2018 19:34:37 +0200 Subject: [PATCH] [mellanox]: Use KVERSION variable in mft recipe Signed-off-by: marian-pritsak --- platform/mellanox/mft.mk | 2 +- platform/mellanox/mft/Makefile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index ef9be7be379f..0164568dbc4f 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -5,5 +5,5 @@ $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft $(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(MFT) -KERNEL_MFT = kernel-mft-dkms_4.8.0-4.9.0-3-amd64_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 c60562ea22e8..cbb6170b1175 100644 --- a/platform/mellanox/mft/Makefile +++ b/platform/mellanox/mft/Makefile @@ -4,11 +4,10 @@ SHELL = /bin/bash MFT_NAME = mft-4.8.0-26-x86_64-deb MFT_TGZ = $(MFT_NAME).tgz -KERNELVER = 4.9.0-3-amd64 SRC_DEB = kernel-mft-dkms_4.8.0-26_all.deb MAIN_TARGET = mft-4.8.0-26.amd64.deb -DERIVED_TARGETS = kernel-mft-dkms_4.8.0-4.9.0-3-amd64_all.deb +DERIVED_TARGETS = kernel-mft-dkms_4.8.0-$(KVERSION)_all.deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf $(MFT_NAME) @@ -23,7 +22,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : fi done - 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` + tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.8.0 -a all -d ubuntu -k $(KVERSION) --media tar | grep "Disk image location" | cut -d':' -f2` popd # fix timestamp because we do not actually build tools, only kernel