Skip to content

Instantly share code, notes, and snippets.

@danish-rehman
Last active August 29, 2015 14:13
Show Gist options
  • Save danish-rehman/0fc918caa87f73d52fab to your computer and use it in GitHub Desktop.
Save danish-rehman/0fc918caa87f73d52fab to your computer and use it in GitHub Desktop.
Compile and install a linux kernel module
# Go to linux kernel source code
# This kernel is already compiled and installed
# on the given host
>> cd /mnt/local/linux-3.16
# Edit the network driver code
>> vim drivers/net/ethernet/intel/igb/igb_main.c
# Compile the module
>> make -C /lib/modules/`uname -r`/build M=drivers/net/ethernet/intel/igb
# Install the module
>> make -C /lib/modules/`uname -r`/build INSTALL_MOD_DIR=kernel/drivers/net/ethernet/intel/igb M=drivers/net/ethernet/intel/igb modules_install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment