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

[PATCH (stage1)] Rework module loading



One of the things that anaconda uses kudzu for is determining the list
of modules to load. This patch fixes that, along with doing a variety
of other things, determined by the following logic:

- We want to move to a model where we just load modules from the
normal information and aliases exported in sysfs
- This means that we are loading (generally) by modalias, not by
module name
- Ergo, we need to either duplicate all the alias handling, sysfs
walking, etc. in anaconda...
- Or, we use the system modprobe and udev coldplug. (That is what
this implements.)
- To use the system modprobe, we either need to hack it to understand
the cpio module ball...
- Or, we move to just shipping a normal tree of modules. (That is
what this implements.)
- To do so, either we need a special static version of modprobe...
- Or, we switch to a dynamic stage 1 (That is what this implements.)

The way module loading now works:

- Under normal circumstances, modules are loaded via standard udev
coldplug mechanisms
- Early module loading is still supported
- Passing module options on the commandline is still supported
- blacklist=<foo> is now supported, to blacklist automatic loading of
a particular module
- nofirewire, nousb, etc. are ignored. The only noXX handled is
'noprobe', which disables udev coldplug entirely.
- Manual driver selection is still allowed, if necessary.

Things not yet modified/fixed in this patchset:
- Manual driver selection is aborting in newt somewhere. May be
unrelated.
- Driver disks are not modified to the new tree layout. Basically,
they should now be extracted and copied to
/lib/modules/$(whatever)/updates/. Some tweaks with depmod may be
necessary to get the aliases in the right place.

Size concerns:
Before: 7.2MB
After: 8.6MB 

Could be reduced by weaning the glib2 dependencies, not linking zlib
statically in modutils, and a couple of other things.

Zee diffstat:

 b/Makefile.inc                   |    2 
 b/loader2/Makefile               |    8 
 b/loader2/cdinstall.c            |   14 
 b/loader2/cdinstall.h            |    8 
 b/loader2/driverdisk.c           |   14 
 b/loader2/driverdisk.h           |    1 
 b/loader2/driverselect.c         |    9 
 b/loader2/hardware.c             |  213 +------
 b/loader2/hardware.h             |   22 
 b/loader2/hdinstall.c            |   20 
 b/loader2/hdinstall.h            |    4 
 b/loader2/loader.c               |  136 ----
 b/loader2/loader.h               |    3 
 b/loader2/method.h               |    5 
 b/loader2/modules.c              | 1146 +++++----------------------------------
 b/loader2/modules.h              |   42 -
 b/loader2/nfsinstall.c           |    8 
 b/loader2/nfsinstall.h           |    4 
 b/loader2/telnetd.c              |    4 
 b/loader2/telnetd.h              |    4 
 b/loader2/urlinstall.c           |    7 
 b/loader2/urlinstall.h           |    4 
 b/scripts/Makefile               |    1 
 b/scripts/buildinstall.functions |  120 ++++
 b/scripts/mk-images              |  291 ++-------
 b/scripts/upd-instroot           |  127 ----
 b/utils/Makefile                 |   11 
 loader2/firewire.c               |   93 ---
 loader2/firewire.h               |    7 
 loader2/modstubs.c               |  263 --------
 loader2/modstubs.h               |    9 
 loader2/moduledeps.c             |  196 ------
 loader2/moduledeps.h             |   15 
 loader2/pcmcia.c                 |  148 -----
 loader2/pcmcia.h                 |   10 
 loader2/usb.c                    |  142 ----
 loader2/usb.h                    |   10 
 utils/moddeps.c                  |   91 ---
 utils/trimmodalias               |   23 
 39 files changed, 491 insertions(+), 2744 deletions(-)

Bill


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