Skip to content

Commit

Permalink
build mft-kernel binary debian package (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan authored and qiluo-msft committed Nov 17, 2016
1 parent 882cfe1 commit 0356d71
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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_all.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

Expand Down
22 changes: 22 additions & 0 deletions src/mft/build.sh
Original file line number Diff line number Diff line change
@@ -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

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 -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_all.deb ../
cp $MFT_NAME/DEBS/mft-4.5.0-31.amd64.deb ../
1 change: 0 additions & 1 deletion src/mlnx-sdk/filelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0356d71

Please sign in to comment.