From e327b8985c62a0ad2ede163263b89b468b62d5be Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Thu, 20 Oct 2016 01:49:10 +0000 Subject: [PATCH 1/2] build mft-kernel binary debian package --- src/Makefile | 3 +++ src/mft/build.sh | 22 ++++++++++++++++++++++ src/mlnx-sdk/filelist.txt | 1 - 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 src/mft/build.sh diff --git a/src/Makefile b/src/Makefile index 9dd79d5b9bd6..bee638be986c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,6 +41,9 @@ p4-bmv2_1.0.0_amd64.deb: thrift-compiler_0.9.3-2_amd64.deb python-thrift_0.9.3-2 $(foreach dep, $^, $(call install_deb, $(dep))) pushd p4-bmv2; ./build.sh; popd +kernel-mft-dkms_4.5.0-3.16.0-4-amd64_x86_64.deb mft-4.5.0-31.amd64.deb: + pushd mft; ./build.sh; popd + python-p4-hlir_0.9.36-1_all.deb: pushd p4-hlir; ./build.sh; popd diff --git a/src/mft/build.sh b/src/mft/build.sh new file mode 100755 index 000000000000..9066e700ea24 --- /dev/null +++ b/src/mft/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +## This script is to build the kernel-mft-dkms_4.5.0-3.16.0-4-amd64 kernel modules +## +## USAGE: +## ./build.sh + +MFT_NAME=mft-4.5.0-31-x86_64-deb +MFT_TGZ=${MFT_NAME}.tgz +MFT_KERNEL_DEB=kernel-mft-dkms_4.5.0-31_all.deb +KERNELVER=3.16.0-4-amd64 + +[ -e $MFT_TGZ ] || wget http://www.mellanox.com/downloads/MFT/${MFT_TGZ} +tar xzf $MFT_TGZ +pushd $MFT_NAME/SDEBS +dpkg -i $MFT_KERNEL_DEB +TARBALL_PATH=$(dkms mkdriverdisk kernel-mft-dkms/4.5.0 -d ubuntu -k ${KERNELVER} --media tar | grep "Disk image location" | cut -d':' -f2) +echo $TARBALL_PATH +tar xvf $TARBALL_PATH +popd + +cp $MFT_NAME/SDEBS/ubuntu-drivers/3.16.0/kernel-mft-dkms_4.5.0-3.16.0-4-amd64_x86_64.deb ../ +cp $MFT_NAME/DEBS/mft-4.5.0-31.amd64.deb ../ diff --git a/src/mlnx-sdk/filelist.txt b/src/mlnx-sdk/filelist.txt index 4426909780d1..52583c7f79c7 100644 --- a/src/mlnx-sdk/filelist.txt +++ b/src/mlnx-sdk/filelist.txt @@ -5,7 +5,6 @@ applibs-dev_1.mlnx.4.2.2100_amd64.deb applibs_1.mlnx.4.2.2100_amd64.deb iproute2-dev_1.mlnx.4.2.2100_amd64.deb iproute2_1.mlnx.4.2.2100_amd64.deb -mft_4.1.0-28_amd64.deb mlnx-sai_1.mlnx.160712_amd64.deb python-sdk-api_1.mlnx.4.2.2100_amd64.deb sx-acl-rm-dev_1.mlnx.4.2.2100_amd64.deb From 5a25d8de0650055eb4c7bfd4516c52ed0021cbc5 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Fri, 21 Oct 2016 06:51:16 +0000 Subject: [PATCH 2/2] address review comments --- src/Makefile | 2 +- src/mft/build.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index bee638be986c..b2cdf8fd87cc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,7 +41,7 @@ p4-bmv2_1.0.0_amd64.deb: thrift-compiler_0.9.3-2_amd64.deb python-thrift_0.9.3-2 $(foreach dep, $^, $(call install_deb, $(dep))) pushd p4-bmv2; ./build.sh; popd -kernel-mft-dkms_4.5.0-3.16.0-4-amd64_x86_64.deb mft-4.5.0-31.amd64.deb: +kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb mft-4.5.0-31.amd64.deb: pushd mft; ./build.sh; popd python-p4-hlir_0.9.36-1_all.deb: diff --git a/src/mft/build.sh b/src/mft/build.sh index 9066e700ea24..44aa233a3124 100755 --- a/src/mft/build.sh +++ b/src/mft/build.sh @@ -9,14 +9,14 @@ MFT_TGZ=${MFT_NAME}.tgz MFT_KERNEL_DEB=kernel-mft-dkms_4.5.0-31_all.deb KERNELVER=3.16.0-4-amd64 -[ -e $MFT_TGZ ] || wget http://www.mellanox.com/downloads/MFT/${MFT_TGZ} +wget -N http://www.mellanox.com/downloads/MFT/${MFT_TGZ} tar xzf $MFT_TGZ pushd $MFT_NAME/SDEBS dpkg -i $MFT_KERNEL_DEB -TARBALL_PATH=$(dkms mkdriverdisk kernel-mft-dkms/4.5.0 -d ubuntu -k ${KERNELVER} --media tar | grep "Disk image location" | cut -d':' -f2) +TARBALL_PATH=$(dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k ${KERNELVER} --media tar | grep "Disk image location" | cut -d':' -f2) echo $TARBALL_PATH tar xvf $TARBALL_PATH popd -cp $MFT_NAME/SDEBS/ubuntu-drivers/3.16.0/kernel-mft-dkms_4.5.0-3.16.0-4-amd64_x86_64.deb ../ +cp $MFT_NAME/SDEBS/ubuntu-drivers/3.16.0/kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb ../ cp $MFT_NAME/DEBS/mft-4.5.0-31.amd64.deb ../