Skip to content

Instantly share code, notes, and snippets.

@udnaan
Created September 8, 2020 20:12
Show Gist options
  • Save udnaan/76a0a63a7b0f12c891e2633df268dc20 to your computer and use it in GitHub Desktop.
Save udnaan/76a0a63a7b0f12c891e2633df268dc20 to your computer and use it in GitHub Desktop.
Build kernel modules that are not included in official build - Debian
Get source: `apt install linux-source-*`
Extract source somewhere `tar xf /usr/src/linux-source-*`
cd to the module to build i.e `cd drivers/nvme/target/`
Build it using existing kernel
make -C /lib/modules/5.7.0-0.bpo.2-amd64/build M=(pwd)
Install to modules extra dir `sudo make -C /lib/modules/5.7.0-0.bpo.2-amd64/build M=(pwd) modules_install`
Generate dependencies `sudo depmod`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment