/lib/modules/$(uname -r)/modules.* [was Re: Who decides what drivers go on the install disk?]

Bill Nottingham notting at redhat.com
Fri Jul 27 02:13:27 UTC 2007


Jeremy Katz (katzj at redhat.com) said: 
> On Thu, 2007-07-26 at 11:18 -0400, Bill Nottingham wrote:
> > Chuck Ebbert (cebbert at redhat.com) said: 
> > > The arcmsr driver is in-kernel but you can't install to a
> > > system using it for the main disk controller:
> > > 
> > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249647
> > > 
> > > Ditto for the uli526x network driver, network installs are
> > > impossible on systems using that:
> > > 
> > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=246165
> > > 
> > > The kernel has the drivers available, but people are reporting
> > > these as kernel bugs...
> > 
> > module-info in the anaconda package.
> 
> I should get back to trying to auto-generate this now that we have the
> modules.scsi, etc files in place...

I have code working for this at the moment... however, it seems wrong.

Right now it's based on the modules.scsi, modules.networking, etc. that are shipped
in very very recent kernel packages. Looking at how it's done now, we have:

    # Generate a list of modules for SCSI, sata/pata, and networking.
    touch $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.scsi
    touch $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.libata
    touch $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.networking
    for i in `cat modnames | grep drivers | grep -v drivers\/ata`
    do
      if [ $(nm $i |grep --count scsi_add_host) -ne 0 ];
      then
        basename `echo $i` >> $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.scsi
      fi
    done
    for i in `cat modnames | grep drivers | grep -v drivers\/scsi`
    do
      if [ $(nm $i |grep --count blk_init_queue) -ne 0 ];
      then
        basename `echo $i` >> $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.scsi
      fi
    done

    for i in `cat modnames | grep drivers\/ata`
    do
      if [ $(nm $i |grep --count ata_device_add) -ne 0 -o $(nm $i |grep --count ata_pci_init_one) -ne 0 ];
      then
        basename `echo $i` >> $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.libata
      fi
    done

    for i in `cat modnames |grep drivers`
    do
      if [ $(nm $i |grep --count register_netdev) -ne 0 ];
      then
        basename `echo $i` >> $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.networking
      fi
    done

in the kernel spec file. This has the following issues:

1) it's not complete (relatively easily fixed, but leads to...)
2) you can't ever fix the list for kernels that have these lists wrong without
   rebuilding them. That's bad.
3) anything that uses this will never work on a) older kernels b) 'upstream' kernels, etc.
4) there's a rather arbitrary ata vs. scsi distinction here that seems solely
   designed to cull the module list for the live CD. Seems strange to me.

Frankly, I think this sort of computation should either a) be done in modutils, so
that it's upstream for any kernel b) just be done in the places that need this info
(anaconda, livecd-tools). They can even just share the implementation.

Bill




More information about the Fedora-kernel-list mailing list