You are not logged in.

#1 2005-06-26 02:27:42

KENTOSI
Member
From: Sydney, Australia
Registered: 2005-02-27
Posts: 69
Website

Not installing as a module.

Hi All,

I'm trying to 'slim down' my kernel, and I noticed that I always installed network and sound drivers as modules.  If I select the other option "Y", which I guess plants the drivers right into the kernel, how do I make the system enable them?

What I'm trying to say is, when I have a driver as a module I use modprobe <driver>.  If I used the other option what do I do?


~gautam

Offline

#2 2005-06-26 02:47:49

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Not installing as a module.

If its compiled into the kernel, then its automatically enabled... meaning, you don't have to do anything.

Dusty

Offline

#3 2005-06-26 03:11:13

KENTOSI
Member
From: Sydney, Australia
Registered: 2005-02-27
Posts: 69
Website

Re: Not installing as a module.

SWEET!!!

So then, why would you bother with modules then?  What's the advantage?


~gautam

Offline

#4 2005-06-26 03:43:34

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Not installing as a module.

In the case of a "standard" kernel like the Arch default kernel, loading all the drivers will use unnecessary memory.  The features most people use are compiled in the kernel. The rest are compiled as modules so users only load the modules they want/need.

Offline

#5 2005-06-26 03:47:49

KENTOSI
Member
From: Sydney, Australia
Registered: 2005-02-27
Posts: 69
Website

Re: Not installing as a module.

Great.  Thanks heaps!


~gautam

Offline

#6 2005-06-26 04:41:23

KENTOSI
Member
From: Sydney, Australia
Registered: 2005-02-27
Posts: 69
Website

Re: Not installing as a module.

Yep, you're right!

I just recompiled my kernel with sound/network built in and all works fine.  If anything, the network module seems to load up a lot quicker too.

Thanks all!


~gautam

Offline

#7 2005-06-26 11:00:38

yak8998
Member
Registered: 2004-03-01
Posts: 143

Re: Not installing as a module.

so if you know exactly what drivers you need, are you better off compiling them into the kernel, rather than loading them as modules?


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#8 2005-06-26 14:57:57

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: Not installing as a module.

That's what I do. However it can be a pain to have to re-compile when you change any hardware.

Offline

#9 2005-06-26 15:21:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Not installing as a module.

If you know your hardware isn't going to change, compile them in. A laptop is a perfect example, where you're unlikely/unable to change the graphics or sound cards etc.  I have found that it doesn't always work - whether that was peculiar to my gear or not, I don't know. The best example of this is the prism54 driver (CONFIG_PRISM54). When I compile it into the kernel, the associated firmware doesn't load, so no wifi. I reckon the hotplug firmware script needs the module to be modprobed, or something like that.

Offline

#10 2005-06-27 15:05:36

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Not installing as a module.

I disagree with that slightly.  Compiled modules are placed into /lib/modules, while the compiled kernel is placed into /boot.  Sometimes these are on different partitions (mine are).

When working with modules vs compiled in drivers, there is no execution difference beyond the initial load (which I doubt anyone would notice).

Compile everything as modules and you get:
a) a smaller kernel (faster load of the initial kernel into memory)
b) more freedom to change hardware, or simply not use a module (to save memory in rare cases)
c) same execution time when calling the driver code

The only thing you really gain when using compiled in drivers is the removal of that initial load delay, which is going to be trumped anyway by the additional delay when loading the entire kernel into memory on boot.

Also, if you have a small boot partition (mine is 30MB ext2) this helps too.

Offline

#11 2005-06-27 16:07:06

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Not installing as a module.

Its hardly worth discussing/arguing. The wonderful thing about the Linux kernel is that you can choose to use as many or as few modules as you like. Which means we can all adjust to our own level of personal preference.

Dusty

Offline

Board footer

Powered by FluxBB