Re: Kernel compiling questions....
Quoth Stefan Srdic,
> My goal is to compile a kernel which performs greatly but is also very
> small with only the basic requirements compiled into the kernel and
> everything else compiled as modules.
Sometimes the way the system is set up makes it a little redundant to
compile things in as modules. For example, on boot, debian will try and
configure the serial ports with setserial (I think), which will load the
serial module, even if you don't intend using it for that session.
But, in general, I agree that modules are a Good Thing.
> So far I've decided on compiling support for my CPU (Athlon/K7), Chipset
> (VIA 82C586), and primary network interface (Vortex) directly into the
> kernel. I also plan on compiling PCI and EISA PnP support along with
> AGP support so that I will not have to recompile the kernel when I
> upgrade some of my hardware.
It sounds like you haven't actually had a look at menuconfig or anything
like that yet (you can check out the options with `make menuconfig' and
not save it or change it later).
Things like CPU type are not available as modules, as they are
fundamental to how the kernel builds and operates. Things like a PCI bus
are also not much good as modules, because there is no point at which
they don't have to be loaded (unless you can get by without video, or
drives, or little things like that...).
Inevitably you will end up having to recompile the kernel if you
significantly change hardware. Don't worry, it's relatively painless
(man kernel-package (5)).
> I'm not sure if I should compile support for my harddrive, floppy and
> CD-RW directly into the kernel or as modules. I do know that I will be
> compiling support for my Voodoo 3, Ensoniq, and Realtek NIC as modules.
Well, you can't compile things like hard drive controllers as modules,
but you can compile support for file systems as modules. Be aware that
if you compile ext2 as a module, you will get a kernel panic when you
boot, as the kernel can't read the filesystem that the module to read
the filesystem is located on!
Your NIC, sound card, and things like drm and maybe even fbcon for the
graphics card are fine as modules (I don't know if the voodoos are
supported as fbcon drivers, but if they are, I find it's better if they
are compiled in, rather than as modules, as they kick in earlier in the
> What should compiled directly into the kernel, and what should be
> compiled into modules? Are there some modules that can be left out all
> together if I'll never use that sort of hardware with Linux (ie: USB)
If you don't use hardware like USB, or video4linux, or IR, or ISDN or
all those other things, leave them out. Usually the help that comes with
the options is a good guide for whether or not you should enable it.
Just make sure you have a working boot disk if you're going to be
experimenting, because sometimes you can accidently get it wrong and end
up with an unbootable system.
Don't worry too much - compiling a kernel is just part of the fun of
running linux. Since I moved to 2.4 (2 days ago), I have re-compiled
about 8 times, trying to get a good combination of stuff!
Damon Muller | Did a large procession wave their torches
Criminologist/Linux Geek | As my head fell in the basket,
http://killfilter.com | And was everybody dancing on the casket...
PGP (GnuPG): A136E829 | - TBMG, "Dead"