[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where is the command to load ethernet network module placed?



On Sat, Oct 18, 2008 at 07:01:22PM +0900, J.H.Kim wrote:
> 2008/10/18 Andrei Popescu <andreimpopescu@gmail.com>
> > On Sat,18.Oct.08, 13:49:25, J.H.Kim wrote:
> > >
> > > I wonder where the ethernet network module is loaded.
> > > Is it loaded in the kernel source code statically or  in the  init
> > script?
> > >
> > > I  think the network  module  is loaded after init user process is
> > created,
> > > but I don't know where the loading point is.
> > >
> > As far as I know modules are loaded automatically after probing the
> > hardware. Maybe telling us what you are trying to achieve would be
> > better.
> >
> 
> I'm reading kernel source  code for the  first time.  First,  I'd like to
> know  how  the PCI  driver  works.
> I found the routines which scans PCI bus and and  adds  the  found  devices
> data structure to  bus data structure.
> But I got lost there.  Each device probe routine seems to be called after
> the related module is loaded. I cannot find the routines which call modprobe
> or insmod  for  desired  modules related to found devices and I wonder how
> the module for each device is selected. So, I'm finding where the network
> driver module is loaded, for example.
> Any advice would be appreciated.

It's likely loaded with the initrd long before the initscripts are run.
You can verfify this if you boot with init=/bin/sh command line and then
run lsmod and see if its already loaded.  If its not, then run each of
the rcS.d scripts (with the start paramater) one at a time and run lsmod
in-between and see.

Doug.


Reply to: