is it necessary to recompile the entire kernel to add support for a device as module
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
is it necessary to recompile the entire kernel to add support for a device as module
Hi,
I have an exisiting compiled kernel (2.6.16) on my Debian Etch system. Afrter compiling/installing I just realized that I forgot to add one option to the kernel before I started compiling i.e.
"AMD and Nvidia IDE support" under Device Drivers->ATA/ATAPI/MFM/RLL support.
I want to compile that option as module and NOT built into the kernel.
Now I have heard that I can do the above without compiling my entire kernel as I always do. Is it true? If it , then how do I do that? I usually compile the kernel debian way(make-kpkg). How can add the support for the option "AMD and Nvidia IDE support" for my existing running kernel(2.6.16) without recompiling the kernel?
It's been awhile compiling a kernel but the basic steps are (I'm running through the steps just for my benefit and assuming you're in the kernel source tree with all the object files present, i.e., you didn't do a make clean):
make menuconfig -- set your prefs
make -- builds the kernel
make modules -- builds the modules
make install -- install the kernel
make modules_install -- install modules
Try pulling up the config menu for the kernel, turn on the option you need and try make modules.
If you're lucky the process will run through the module source code, skipping (hopefully) everything that has been compiled until make hits the code for the module you need.
It's been awhile compiling a kernel but the basic steps are (I'm running through the steps just for my benefit and assuming you're in the kernel source tree with all the object files present, i.e., you didn't do a make clean):
make menuconfig -- set your prefs
make -- builds the kernel
make modules -- builds the modules
make install -- install the kernel
make modules_install -- install modules
Try pulling up the config menu for the kernel, turn on the option you need and try make modules.
If you're lucky the process will run through the module source code, skipping (hopefully) everything that has been compiled until make hits the code for the module you need.
Thanks for the reply but as I said I would like to know in term of debian way. Also I need to know if anyone has tried like this before.?
Ok, got it. So does it mean that if I do make modules, my kernel will still remian the same but now with added support for that new option in the forms of modules? i.e. I won't have to install the kernel agian?
If you add the module to the configuration, then do a make modules, you should see it go very quickly through everything until it gets to the section where it needs to compile your new modules, compile those modules, then finish up the rest of it very quickly. No new kernel /should/ be required, though I am sure that there are some special cases where this would break the running kernel because of some dependency.
If you add the module to the configuration, then do a make modules, you should see it go very quickly through everything until it gets to the section where it needs to compile your new modules, compile those modules, then finish up the rest of it very quickly. No new kernel /should/ be required, though I am sure that there are some special cases where this would break the running kernel because of some dependency.
Ok so to sum up, assuming that my kernel does not break bcos of dependency, doing a make modules and make modules_install should be enough to get the support right? Is there anything else that I need to do? Like restarting a system or making some changes in grub/lilo or /etc/modules?
Also I am not sure if I would require make modules_install. can anyone comment on that?
make modules_install is needed, or else the new modules would never be installed. You should be good to go at that point, and should be able to do a modprobe of the new modules to get them up and running.
Making changes to /etc/modules might be nice if you need these modules at the next boot-up. And if you need the modules to be loaded in an initrd you will have to work with that as well.
make modules_install is needed, or else the new modules would never be installed. You should be good to go at that point, and should be able to do a modprobe of the new modules to get them up and running.
Making changes to /etc/modules might be nice if you need these modules at the next boot-up. And if you need the modules to be loaded in an initrd you will have to work with that as well.
Thank you guys for all your suggestion and idea. They were quite helpful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.