View previous topic :: View next topic |
Author |
Message |
Bear Knuckle n00b
Joined: 22 Jun 2005 Posts: 21
|
Posted: Sun Jun 26, 2005 6:42 pm Post subject: Whats the difference between in kernel and as module and why |
|
|
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 |
|
|
Fredde Tux's lil' helper
Joined: 08 Feb 2005 Posts: 98
|
Posted: Sun Jun 26, 2005 7:50 pm Post subject: |
|
|
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 |
|
|
chunderbunny Veteran
Joined: 31 May 2004 Posts: 1281 Location: 51°24'27" N, 0°57'15" W
|
Posted: Sun Jun 26, 2005 7:52 pm Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Sun Jun 26, 2005 8:56 pm Post subject: |
|
|
Modules are better for 'suspend to ram' or 'suspend to disk' - because modules can be unloaded before going into suspend. |
|
Back to top |
|
|
|