Reputation: 1198
I can build a loadable module and it is working with the application successfully. Now I'm trying to include this driver in kernel driver folder as a built-in driver. But when i tried this, there is no device file created in /dev folder. What are the necessary steps to do this built-in module ? Is there any modification needed in the existing module ?
Thanks in advance
Upvotes: 4
Views: 8496
Reputation: 575
I believe your question is similar to the question Compiling a driver as a part of a kernel, not as a module
The answer to that question mentioned modifying the kernel Makefiles to include your module object or directory.
In summary the steps are:
<linux kernel
src>/drivers
.Edit the Makefile to add the line:
obj-y += your_driver_dir
Edit the Makefile in your driver directory to add the line:
obj-y := your_driver.o
Upvotes: 6
Reputation: 1641
If you would like to include your module into your kernel modules (not building), you need to copy yourmodule_file.ko
under /lib/modules/$(uname -r)/
and give the command depmod -a
, after this you can load your module with modprobe
.
Upvotes: 0