Skip to content

Instantly share code, notes, and snippets.

@fermayo
Forked from vdm/ixgbevf-upgrade.sh
Last active August 29, 2015 14:25
Show Gist options
  • Save fermayo/1f1b9f10bf14b19a9f1b to your computer and use it in GitHub Desktop.
Save fermayo/1f1b9f10bf14b19a9f1b to your computer and use it in GitHub Desktop.
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
#/bin/sh
# Run as root!
set -e
apt-get update -q
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced-networking-ubuntu
DEBIAN_FRONTEND=noninteractive apt-get install -y dkms linux-headers-generic
wget "http://sourceforge.net/projects/e1000/files/ixgbevf stable/2.16.1/ixgbevf-2.16.1.tar.gz"
tar zvxf ixgbevf-2.16.1.tar.gz
mv ixgbevf-2.16.1 /usr/src/
# https://gist.github.com/defila-aws/44946d3a3c0874fe3d17
curl -L https://gist.githubusercontent.com/fermayo/7c0f059d8c0be1d2da7a/raw/cf54df962034046d4360c0815238703ab5ca5e4c/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch > /tmp/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
cd /usr/src/ixgbevf-2.16.1/src
patch -p5 < /tmp/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
cat > /usr/src/ixgbevf-2.16.1/dkms.conf <<EOF
PACKAGE_NAME="ixgbevf"
PACKAGE_VERSION="2.16.1"
CLEAN="cd src/; make clean"
MAKE="cd src/; make BUILD_KERNEL=${kernelver}"
BUILT_MODULE_LOCATION[0]="src/"
BUILT_MODULE_NAME[0]="ixgbevf"
DEST_MODULE_LOCATION[0]="/updates"
DEST_MODULE_NAME[0]="ixgbevf"
AUTOINSTALL="yes"
EOF
dkms add -m ixgbevf -v 2.16.1
dkms build -m ixgbevf -v 2.16.1
dkms install -m ixgbevf -v 2.16.1
update-initramfs -c -k all
modinfo ixgbevf
echo "Now execute: aws ec2 modify-instance-attribute --instance-id instance_id --sriov-net-support simple"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment