-   Linux - Software (
-   -   Recompiling kernel required to add modules? (

littlebigman 01-04-2011 06:29 AM

Recompiling kernel required to add modules?

I only have basic experience recompiling a Linux kernel, and I have a question about adding dynamic modules.

In case I want to add a brand new module, do I need to recompile the kernel to include a reference to that new module, or is simply compiling a kernel with generic support of dynamic modules all it takes to add whatever modules I need later on, without recompiling the kernel and rebooting the host?

Thank you.

orgcandman 01-04-2011 02:08 PM

If you have the complete kernel build tree for your currently running kernel, configured correctly, and it has support for dynamically loaded modules, you shouldn't need to rebuild your kernel to build different modules / add new modules. BE CAREFUL THOUGH! I specifically used the word "shouldn't." Some modules have options which change header files, or object location definitions which can break kernel linkage. When in doubt, it's not too much hassle to rebuild the whole thing; the only impact is the time it takes to reboot.

littlebigman 01-05-2011 12:57 PM

Thanks for the tip. I kind of understood that, provided a kernel had been compiled with support for dynamic modules and its header files were available, it was possible to compile and load a new module without having to compile a new kernel and reboot with it.

All times are GMT -5. The time now is 05:33 AM.