Skip to content

Instantly share code, notes, and snippets.

@DisasteR
Forked from sling00/ixgbe_debian.md
Last active March 18, 2021 21:35
Show Gist options
  • Save DisasteR/db93d2db1ea82ecbc92a46eff3031b4f to your computer and use it in GitHub Desktop.
Save DisasteR/db93d2db1ea82ecbc92a46eff3031b4f to your computer and use it in GitHub Desktop.
Debian ixgbe module compilation

Debian ixgbe module compilation

Some OVH dedicated server does not supports installing Debian original kernel due to hardware support issue. Also new Supermicro Atom 3000 SOC based products need an updated driver on ubuntu 14.04/16.04/17.04 to recognize the network adapter.

Most common issue is the network adapter card.

Resources

Install ixgbe module without DKMS support

See also with DKMS support.

apt-get install -y linux-image-amd64 linux-headers-amd64
mv /etc/grub.d/06_OVHkernel /etc/grub.d/25_OVHkernel
update-grub
apt-get install -y make gcc
BUILD_KERNEL=$(sed -n -e '/vmlinuz-.*-amd64/p' /boot/grub/grub.cfg | sed -e 's/.*vmlinuz-\(.*-amd64\) .*/\1/' | head -n 1)
cd /usr/src
wget "https://downloadmirror.intel.com/14687/eng/ixgbe-5.2.4.tar.gz"
tar xzvf ixgbe-5.2.4.tar.gz
cd ixgbe-5.2.4/src
make CFLAGS_EXTRA="-DIXGBE_NO_LRO" BUILD_KERNEL="$BUILD_KERNEL" install
update-initramfs -tuk $BUILD_KERNEL
reboot 

Install ixgbe module with DKMS support

Download and decompress ixgbe :

cd /usr/src
wget "https://downloadmirror.intel.com/14687/eng/ixgbe-5.2.4.tar.gz"
tar xzvf ixgbe-5.2.4.tar.gz
cd ixgbe-5.2.4/

Install dkms requirements :

apt-get install debhelper dkms

Create /usr/src/ixgbe-5.2.4/dkms.conf file the following content :

## dkms.conf for ixgbe
##original make options: 
#MAKE="BUILD_KERNEL=${kernelver} make -C src/ CFLAGS_EXTRA=-DIXGBE_NO_LRO KERNELDIR=/lib/modules/${kernelver}/build"
## dont disable LRO by default: 
MAKE="BUILD_KERNEL=${kernelver} make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C src/ clean"
BUILT_MODULE_NAME=ixgbe
BUILT_MODULE_LOCATION=src/
DEST_MODULE_LOCATION="/updates"
PACKAGE_NAME=ixgbe-dkms
PACKAGE_VERSION=5.2.4
REMAKE_INITRD=no

#Note: to disable LRO is disabled using make extra flags.

Register module with dkms :

dkms add -m ixgbe -v 5.2.4

Build module with dkms :

dkms build -m ixgbe -v 5.2.4

Make Debian source package :

dkms mkdsc -m ixgbe -v 5.2.4 --source-only

Make Debian binary package :

dkms mkdeb -m ixgbe -v 5.2.4 --source-only

apply this https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832558 if :

DKMS: mkdeb completed.
Moving built files to /var/lib/dkms/ixgbe/5.3.4/deb...mv: cannot stat '/tmp/dkms.kvdvUq/ixgbe-dkms_5.3.4_amd64.deb': No such file or directory
(bad exit status: 1)
Cleaning up temporary files...

For install locally using Debian package, first copy the deb file :

cp /var/lib/dkms/ixgbe/5.2.4/deb/ixgbe-dkms_5.2.4_all.deb /usr/src/

Then delete build files (avoid conflicts) :

rm -r /var/lib/dkms/ixgbe/

Finally install locally :

cd /usr/src
dpkg -i ixgbe-dkms_5.2.4_all.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment