moving from amd to p3?

Doug Sutherland doug at proficio.ca
Sun Jun 17 22:56:59 EDT 2007


Yes, lspci is very useful in knowing what hardware you have, and
therefore what drivers you need. Try using the -v verbose option.
Then on your running system, do lsmod and note what drivers you
have loaded, and match them with your pci devices. Some may
not be modules, because all of these drivers can be either loadable
modules or statically compiled into the kernel.

I actually think going through the config process, even frequently
is a good idea, because it teaches you about all of the various
drivers. When you first start building kernels it's inevitable that
some mistakes will be made, but those are valuable experiences.
I recall selecting a processor option that I thought was right and
the system wouldn't boot, won't be making that mistake again.
I have at times missed selecting drivers I needed, or included
stuff I will never use, but over time you get to know what they
all are. I can go through the kernel config very fast now and
know what I need, which in the large collection of stuff is not
much!

Also look at your existing .config file. There you see all of the
drivers listed, which are statically built into kernel, which are
modules, and which are not included. The "standard" kernels
that come with distros usually have way more than you need.
That's not really a problem these days with tons of RAM
available and fast processors, but you can reduce your build
time a lot by removing a bunch of stuff you don't need. I have
become more disciplined with this because I also work on
embedded systems where you definitely only want what you
need, it's unthinkable to compile drivers for hardware that
you don't have.

The only way to really get to know the kernel drivers is to
build kernels. It does take a long time, but I recommend
not sitting around waiting for them, start a build and go to
sleep, go for a walk, go to work, whatever.

The "default" kernel will have all of the various ethernet
drivers included, when I only need one, and only one will
work with my hardware. Same is true of other things like
audio, but you need to get to know that there are core
drivers and hardware specific. For example, with usb there
is a usb core driver, everyone needs that, but your system
will have either an ohci, uhci, or ehci controller, and the
devices you actually use on usb are probably just a few
compared to the huge list that gets compiled if you choose
them all. Audio is similar, you have core drivers for alsa
and then hardware specific ones.

There is usually huge sections of the kernel that you don't
need on a PC, for example, I have an IDE controller so
I don't need SCSI, I only need SCSI emulation to support
CD burning, so I exlude most of SCSI. I don't need a 
game controller joystick port. I don't need any of the 
printer drivers. I don't need all of those flash devices 
listed as mtd, memory technology devices, etc. 

After you have gone through the config several times you
get to know what you need and don't. The kernel is huge,
getting to be kinda scary huge. Usually including extra
stuff doesn't really "cost" you anything more than some
disk space and compile time, because your system will
only load drivers it actually needs, unless you statically
compile in stuff you don't have hardware for. So it's safe
to include all of the networking hardware driver, for
example, but getting to know what all these drivers are
takes the mystery out of the kernel, and also teaches
you what hardware is supported, when you go to buy
new cards or peripherals.

Another thing to consider, there is a huge amount of
networking code, much of which you don't need if you
are just using the web and email etc. Excluding stuff you
don't need increases security. If I will never do any
point to point tunneling, then I'd rather not let anyone,
in case someone does manage to compromise the
machine. The networking in particular takes some time
to understand, but there are tons of good FAQs on the
net about most of it. Do I need sendmail? Not me, I
just use a provider pop3 server for mail. Do I need
multicast networking? Nope. I only need DHCP 
client support, not server. There are so many things I 
don't need altogether. Getting to know what you do 
need speeds up builds and increases your chances 
of successful builds. I have found that sometimes my
kernel build will terminate in error trying to build 
some module I will never use. Actually that has 
happened quite a lot over the years. Better to just
compile what I need.  

  -- Doug


Scott wrote:
What is the best way to go through the config?  
Do you just do like a lspci <snip>





More information about the Speakup mailing list