Skip to content

Commit

Permalink
[mellanox]: Use KVERSION variable in mft recipe (#11)
Browse files Browse the repository at this point in the history
Signed-off-by: marian-pritsak <marianp@mellanox.com>
  • Loading branch information
marian-pritsak authored and lguohan committed Jan 25, 2018
1 parent 9d4b52c commit 74a2535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/mellanox/mft.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
5 changes: 2 additions & 3 deletions platform/mellanox/mft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 74a2535

Please sign in to comment.