Skip to content

Instantly share code, notes, and snippets.

@arvati
Last active June 28, 2024 19:30
Show Gist options
  • Select an option

  • Save arvati/004526e06da88aacf56f23abe19970f4 to your computer and use it in GitHub Desktop.

Select an option

Save arvati/004526e06da88aacf56f23abe19970f4 to your computer and use it in GitHub Desktop.
Build single kernel module in tree
sudo apt install build-essential libncurses-dev linux-headers-amd64 linux-source
cd /usr/src/
tar xf linux-source-4.19.tar.xz 
cd linux-source-4.19
cp ../linux-headers-4.19.0-9-amd64/Module.symvers .
cp /boot/config-4.19.0-9-amd64 ./.config # copy from boot folder
make oldconfig # it copies .config to ./
nano .config # enable module, ex: CONFIG_FT1000=m
make menuconfig # to confirm
make scripts
make prepare # setup FT1000 as module
make modules_prepare
make -C . M=drivers/staging/ft1000/ft1000-usb
cp drivers/staging/ft1000/ft1000-usb/ft1000.ko /lib/modules/4.19.0-9-amd64/kernel/drivers/staging/
depmod
modprobe ft1000
@arvati
Copy link
Copy Markdown
Author

arvati commented Jul 1, 2020

@arvati
Copy link
Copy Markdown
Author

arvati commented Jul 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment