LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Recompiling kernel required to add modules? (http://www.linuxquestions.org/questions/linux-software-2/recompiling-kernel-required-to-add-modules-854102/)

littlebigman 01-04-2011 05:29 AM

Recompiling kernel required to add modules?
 
Hello

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 01: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 11:57 AM

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 04:54 PM.