Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build mft-kernel binary debian package #36

Merged
merged 2 commits into from
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

[ -e $MFT_TGZ ] || wget http://www.mellanox.com/downloads/MFT/${MFT_TGZ}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wget -N: to detect remote file content updating.

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dkms mkdriverdisk command creates debian package with architecture x86_64, which yields an error during instalation due to arch mismatch
You can add option -a all to set architecture type to all to allow any arch

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 ../
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