LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 05-22-2006, 07:40 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Rep: Reputation: 48
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?

Thanks.
 
Old 05-22-2006, 08:19 PM   #2
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 30
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.
 
Old 05-22-2006, 11:46 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by vls
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.?
 
Old 05-23-2006, 07:59 AM   #4
JackieBrown
Member
 
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
Quote:
Originally Posted by kushalkoolwal
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.?
What he said should still be true.
 
Old 05-23-2006, 12:19 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by JackieBrown
What he said should still be true.
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?
 
Old 05-23-2006, 01:27 PM   #6
JackieBrown
Member
 
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
no, it means that it should only have to compile the new stuff. The rest of the compile should breeze through.
 
Old 05-23-2006, 02:20 PM   #7
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, CentOS, gentoo
Posts: 382

Rep: Reputation: 31
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.
 
Old 05-23-2006, 02:58 PM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by Wells
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?
 
Old 05-23-2006, 03:49 PM   #9
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, CentOS, gentoo
Posts: 382

Rep: Reputation: 31
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.
 
Old 05-24-2006, 12:16 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by Wells
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not recompile kernel, but 1 module -possible? deNiro Debian 4 01-31-2005 03:48 PM
Redhat 9 recompile kernel for "module" support? realized Linux - Newbie 2 10-11-2004 03:42 AM
Recompile of Kernel, Slack 10: i've lost device support sganarelle Slackware 2 08-14-2004 06:48 AM
Poor device support after kernel recompile - possible problem with modules? Dag Linux - General 1 08-04-2004 03:42 PM
Kernel / module recompile for 5.1 ? how ? Wynand1 Linux - Newbie 6 03-09-2004 01:33 AM


All times are GMT -5. The time now is 03:15 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration