Solved Integrate driver with kernel or as a module ?

Hi All,

I have to integrate a new driver for test purposes.
I wanted to build it in the kernel directly.
But honestly, i don't know if its the best way, i'm wondering what is the pro/cons to integrate a driver directly with the kernel or as a module.

For test purposes, i guess its better as a module make it easier to change it if there is any problems..anyway..If you any feedback from your experiences... :)

N!
 
You should probably read up on something with regard to the kernel development. There is no meaningful difference between statically linked and loadable modules.
 
i'm wondering what is the pro/cons to integrate a driver directly with the kernel or as a module.
Everything is a module. Integrating them just means they're statically linked in the kernel. It's still a module, so there's no difference in this respect.

For development dynamically loading modules is easier to work with. You just need to recompile your module, not the whole kernel. And you can just load/unload it instead of having to reboot to load the new kernel.
 
Hi All,

Everything is a module. Integrating them just means they're statically linked in the kernel. It's still a module, so there's no difference in this respect.

Thanks for the precision ;)


For development dynamically loading modules is easier to work with. You just need to recompile your module, not the whole kernel. And you can just load/unload it instead of having to reboot to load the new kernel.

Perfect, i wanted to be sure about that.

Thanks all !
 
But honestly, i don't know if its the best way, i'm wondering what is the pro/cons to integrate a driver directly with the kernel or as a module.
Advantage of having it fully built in: less complexity in configuring the kernel. If you are sure that you will always need it, there is one fewer configuration setting. In the old days, when it was reasonable to create a kernel that didn't use modules at all, that was a real advantage. Today, that makes very little difference.

For test purposes, i guess its better as a module make it easier to change it if there is any problems...
For the debug/test cycle, as SirDice said, it is much faster to unload the module, change the source, recompile, reload, compared to a full reboot or two per cycle. But be aware that kernel development (in particular driver development) is often debugged by crashing, so expect it to be inefficient.
 
Back
Top