Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Whats the difference between in kernel and as module and why
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bear Knuckle
n00b
n00b


Joined: 22 Jun 2005
Posts: 21

PostPosted: Sun Jun 26, 2005 6:42 pm    Post subject: Whats the difference between in kernel and as module and why Reply with quote

Hi!

I am pretty new in compiling the kernel myself. Now I am wondering why I should compile some things as a module and some not? Ok, I don't have to recompile the whole kernel if I don't need something anymore and I did it as a module, but kernel compilation takes me a minute, so that's no big deal.

Where can I find a "Why you should compile this in the kernel and that as a module" documentation?
Back to top
View user's profile Send private message
Fredde
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2005
Posts: 98

PostPosted: Sun Jun 26, 2005 7:50 pm    Post subject: Reply with quote

Hi!

If kernel size is an issue then modules are the answer. They will will be separate binary files that resides outside the kernel (usally with name *.o or *.ko).
Kernel size is almost never a problem, so go ahead and compile in if you know you are going to use drivers that you compile in.

But modules are great in some cases, some might be:

1. Kernel size
2. With modules you can specify the order in which they will load. Some drivers depends on other drivers.
If you compile in you will not have any control over them.
3. You keep the kernel clean, just the basic stuff. If you like to experiment with different hardware modules is a great way of having control over what is loaded and when.

Hope this help.


Last edited by Fredde on Mon Jun 27, 2005 6:56 am; edited 1 time in total
Back to top
View user's profile Send private message
chunderbunny
Veteran
Veteran


Joined: 31 May 2004
Posts: 1281
Location: 51°24'27" N, 0°57'15" W

PostPosted: Sun Jun 26, 2005 7:52 pm    Post subject: Reply with quote

There probably isn't any documentation because to most of us it really doesn't make any difference whenterh you use modules for stuff or build i in the kernel.

Personally I like to build everything I need to boot the system (filesystem drivers etc) into the kernel, and everything else (network drivers etc) as a module. I just like having modules so when I use "lsmod" I can see what functions my kernel is able to perform. I'm pretty sure that if I compiled all the stuff into the kernel it wouldn't make any noticeable difference whatsoever, it's just a preference thing.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Sun Jun 26, 2005 8:56 pm    Post subject: Reply with quote

Modules are better for 'suspend to ram' or 'suspend to disk' - because modules can be unloaded before going into suspend.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum