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
Last active
June 28, 2024 19:30
-
-
Save arvati/004526e06da88aacf56f23abe19970f4 to your computer and use it in GitHub Desktop.
Build single kernel module in tree
Author
Author
httpd://www.kernel.org/doc/html/latest/kbuild/modules.html
https://oslongjourney.github.io/linux-kernel/compile-in-tree-kernel-module/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://askubuntu.com/questions/168279/how-do-i-build-a-single-in-tree-kernel-module
https://yoursunny.com/t/2018/one-kernel-module/