[mellanox] Add cpldupdate utility to SONiC image (#1746)

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
This commit is contained in:
stepanblyschak 2018-06-09 21:31:34 +03:00 committed by lguohan
parent dc547e4c8d
commit ed06aca40e
3 changed files with 18 additions and 10 deletions

View File

@ -1,9 +1,17 @@
# Mellanox SAI
MFT = mft-4.5.0-31.amd64.deb
MFT_VERSION = 4.5.0
MFT_REVISION = 31
export MFT_VERSION MFT_REVISION
MFT = mft-$(MFT_VERSION)-$(MFT_REVISION).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_$(MFT_VERSION)-$(KVERSION)_all.deb
$(eval $(call add_derived_package,$(MFT),$(KERNEL_MFT)))
MFT_OEM = mft-oem-$(MFT_VERSION)-$(MFT_REVISION).amd64.deb
$(eval $(call add_derived_package,$(MFT),$(MFT_OEM)))

View File

@ -1,12 +1,12 @@
.ONESHELL:
SHELL = /bin/bash
MFT_NAME = mft-4.5.0-31-x86_64-deb
MFT_NAME = mft-$(MFT_VERSION)-$(MFT_REVISION)-x86_64-deb
MFT_TGZ = $(MFT_NAME).tgz
SRC_DEB = kernel-mft-dkms_4.5.0-31_all.deb
SRC_DEB = kernel-mft-dkms_$(MFT_VERSION)-$(MFT_REVISION)_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-$(MFT_VERSION)-$(MFT_REVISION).amd64.deb
DERIVED_TARGETS = kernel-mft-dkms_$(MFT_VERSION)-$(KVERSION)_all.deb mft-oem-$(MFT_VERSION)-$(MFT_REVISION).amd64.deb
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf $(MFT_NAME)
@ -21,11 +21,11 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
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/$(MFT_VERSION) -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
touch $(MFT_NAME)/DEBS/$*
mv $(MFT_NAME)/SDEBS/ubuntu-drivers/3.16.0/$(DERIVED_TARGETS) $(MFT_NAME)/DEBS/$* $(DEST)
touch $(MFT_NAME)/DEBS/*
mv $(MFT_NAME)/SDEBS/ubuntu-drivers/3.16.0/kernel-mft-dkms_$(MFT_VERSION)-$(KVERSION)_all.deb $(MFT_NAME)/DEBS/* $(DEST)
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

View File

@ -3,7 +3,7 @@
SONIC_ONE_IMAGE = sonic-mellanox.bin
$(SONIC_ONE_IMAGE)_MACHINE = mellanox
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
$(SONIC_ONE_IMAGE)_INSTALLS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT) $(MLNX_HW_MANAGEMENT)
$(SONIC_ONE_IMAGE)_INSTALLS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT_OEM) $(MFT) $(MLNX_HW_MANAGEMENT)
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FW_FILE)
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)