hardware detection in lfs

Ken Moffat ken at kenmoffat.uklinux.net
Wed Jan 15 12:22:20 PST 2003


On Wed, 15 Jan 2003, P.B.Prabhuram wrote:

> 
> Can you please briefly explain how to modprobe and
> compile for that , when new hardware is attached.
>

 OK, but first off you need to be aware that a lot of hardware will work
without changing your kernel configure options. For example, when you
set the options for ide (ATA/IDE/MFM/RLL support) pick all of the IDE
chipset support / bugfixes options that you think the machines using
this kernel are likely to ever need. Provided you've compiled in IDE
support, the kernel usually doesn't need an alteration when all that's
changed is the IDE controller and the attached hard disks.

 What *does* tend to need modules to provide the right driver is the
choice of network cards. Accessing removable storage (zip disks using
ide-floppy, CDs using ide-cd or scsi-cd are other areas you might want
to use modules. As an example, suppose you want to run this kernel on
different machines using various network cards (e.g. natsemi, tulip,
8139too, fealnx).

1. In Loadable Module Support, configure Enable Loadable Module Support
AND kernel module loader.

2. In Network Device Support | Ethernet 10 or 100 Mbit select 'm'
against each of the likely network cards.

3. When you build the kernel, after `make bzImage' (or `make vmlinux',
or whatever applies to your architecture) remember to `make modules' and
`make modules_install'. This latter should end by running depmod -ae
which will tell you if there are unresolved dependencies. If there are,
it either means you need to make something else as a module, or
occasionally it means the kernel configure options have been broken.

4. When it has all been built, and you have rebooted into this new
kernel, try modprobe. Assuming your current network card is a tulip, try
`modprobe tulip'. This should load the module, and allow you to
`ifconfig' the network.  
 
> Also will this help me , when i am going to copy my
> lfs to another system with ( different hardware but
> same architecture ).  is there any automative scripts
> for performing this ??????
> 

5. I don't know about automating this. When you know which modules are
required for your current hardware, check the man page for
modules.conf. You will need to specify a whole load of paths for where
the module source is located, each something like /lib/modules/`uname
-r`/kernel/drivers/{net,wherever} . (Note the back-quotes in this.) You
will also want, in my example, to specify "alias eth0 tulip" to tell the
kernel to automatically load tulip.o when eth0 is accessed.

HTH,

Ken
-- 
 Out of the darkness a voice spake unto me, saying "smile, things could be
worse". So I smiled, and lo, things became worse.



-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list