Message Board -  Archive

[ Login ] [ Create Account ]
[ Board List ] [ View Board ] [ Post Reply ]
  Author  Subject: Re: built-in versus loaded modules
Archive  

Posted on 10-22-2004 02:10 a.m. ET  reply

Original Poster: Mark Krentel

> I'm looking into compiling my own kernel, because of advice I have
> stating that in the case of a PCMCIA WLAN card I have, it seems to be
> better to load the PCMCIA driver than to build it into the kernel.
> (If that statement doesn't make sense, please alert me...)

Uh, no, that doesn't make much sense. If you have a difficult driver
that doesn't load with a simple modprobe, then the principle reason to
build a kernel would be to add a source patch for that driver into the
kernel build. If you're going to use a pre-built module, then there
isn't much reason to compile the kernel yourself.

Does the PCMCIA driver come with some documentation that says to build
a kernel with some special options?

> Trouble is, I don't know how to tell which drivers or modules are
> built in to the kernel I'm using (RH9 2.4.20-6). I know the lsmod
> command lists loaded drivers, but does it also list driver modules
> built into the kernel itself? If not, how does one list these?

Good question. I could tell you the Freebsd answer (kldstat -v).

For Linux, probably your best bet is to get the config file from which
the kernel was built. Assuming it's the default kernel and assuming
you have the kernel source installed, then cd to /usr/src/linux (or
whatever), remove (or rename) the .config file, then run "make
menuconfig" or "make xconfig". The options that it shows you are the
default options.

> Also, when building the kernel, and setting everything up via make
> config or make xconfig, for most things there are three choices, y, m,
> and n. Now, if I pick 'y', does that mean the kernel will incorporate
> that component right into itself? If I pick 'm', does that mean the
> make will produce a loadable module of corresponding name that I can
> choose to load myself?

Yes. "Y" means put it into the kernel directly, "M" means build it as
an external module, and "N" (or blank) means don't compile it at all.

I wrote a quick outline of the steps to compile a kernel back in the
June 2004 archive.

--Mark

< Previous 1 Next >

Site Contents