

    1        depmod and modprobe                                               1
    2        Optional configuration file /etc/conf.modules                    1
    3        modprobe                                                          3
    4        depmod                                                            3
    5        Liste des sp‚cifications non class‚es                             4


    1        depmod and modprobe                                         
    
    depmod and modprobe are the components used to make linux 
    modular kernel manageable from a user or administrator stand 
    point.
    
    2        Optional configuration file /etc/conf.modules              
    
    
      [config.c,1]
      #Specification: /etc/conf.modules / format
    
    	Modules may be located at different place in the filesystem.
    	We expect some standard to emerge. We expect that the
    	FSSTND will address this in the future.
    
    	There will always be some need to override this, especially for
    	modules developpers.
    
    	The file /etc/conf.modules will contain different definition to
    	control the manipulation of the module.
    
    	The format will be fairly simple:
    
    	parameter=value
    	.
    	parameter=value
    
    	Standard Unix style comments and continuation line are supported.
    	Comments begin with a # and continue until the end of the line.
    	A line continue on the next one if the last non-white character
    	is a \.
    
      [config.c,72]
      #Specification: /etc/conf.modules / missing
    
    	This file is optional. No error is printed if it
    	is missing. If it is missing the following content
    	is assumed.
    
    	path[boot]=/lib/modules/boot
    	path[fs]=/lib/modules/`uname -r`/fs
    	path[misc]=/lib/modules/`uname -r`/misc
    	path[net]=/lib/modules/`uname -r`/net
    	path[scsi]=/lib/modules/`uname -r`/scsi
    
    	path[fs]=/lib/modules/default/fs
    	path[misc]=/lib/modules/default/misc
    	path[net]=/lib/modules/default/net
    	path[scsi]=/lib/modules/default/scsi
    
    	path[fs]=/lib/modules/fs
    	path[misc]=/lib/modules/misc
    	path[net]=/lib/modules/net
    	path[scsi]=/lib/modules/scsi
    


                                                             1


    	The idea is that modprobe will look first it the
    	modules compiled for the current release of the kernel.
    	If not found, it will look into the default release.
    	And if not found, it will look in the other directory.
    
    	The strategy should be like this. When you install a
    	new linux, the modules should go in a directory
    	related to the release of the kernel you are installing.
    	Then you do a symlink default to this directory.
    
    	Each time you compile a new kernel, the make modules_install
    	will set new directory, but won't change de default.
    
    	When you get a module unrelated to the kernel distribution
    	you place it in one of the last three directory.
    
    	This is the default strategy. Off course you can overide
    	this in /etc/conf.modules.
    
      [config.c,152]
      #Specification: config file / path parameter
    
    	The path parameter specify a directory to
    	search for module. This parameter may
    	be repeated multiple time.
    
    	Optionally the path parameter carries
    	a tag. This tells us a little more about
    	the purpose of this directory and
    	allows some automated operations.
    	The tag is sticked to the path word
    	enclose in square braket.
    	path[boot]=/lib/modules/boot
    
    	This identify the path a of directory
    	holdding modules loadable a boot time.
    
    	Hopefully, insmod will have an option
    	to load a list of module using
    	such a tag.
    
    	If the tag is missing, the word "misc"
    	is assumed.
    
      [config.c,210]
      #Specification: config file / depfile parameter
    
    	The default value for the depfile parameter is:
    
    	depfile=/lib/modules/`uname -r`/modules.dep
    
    	If the config file exist but lack a depfile
    	specification, it is used also since the system
    	can't work without one.
    
    	Once we have the depfile value, we pass to the shell
    	with a popen() to resolve whatever shell construct in
    	its value. We execute a echo command.


                                                             2


    	echo read_value
    
      [config.c,292]
      #Specification: reading directory / ls command
    
    	We are using the command ls to locate entries in directories.
    	This has the advantage of allowing complex wildcard specification
    	in /etc/conf.modules. For example.
    
    	path[misc]=/lib/modules/1.1.5?/misc
    
      [config.c,250]
      #Specification: reading directory / ls command / path
    
    	The ls command must be either in /bin or /usr/bin.
    
      [config.c,301]
      #Specification: reading directory / ls command / default extension
    
    	If a search pattern does not have an extension, we add the following
    	string to the pattern .{mod,o}.
    
    	The impact is that modprobe accept argument both with or without
    	extension.
    
    
    3        modprobe                                                    
    
    
      [modprobe.c,300]
      #Specification: modprobe -r / unknown module
    
    	If there is no information about a module in
    	the dependancy file, we simply call /sbin/rmmod
    	on the module without further checking.
    
    
    4        depmod                                                      
    
    
      [depmod.c,46]
      #Specification: depmod / kernel syms only
    
    	When initialising its symbol table from the kernel
    	depmod silently discards all symbol from loaded modules.
    
    	This means that depmod may be used at any time to compute
    	the dependancy table, even if there are modules already
    	loaded.
    
    	depmod use the kernel system call to obtain the
    	symbol table, not /proc/ksyms. depmod assume that
    	kernel symbols are at the end of the list, just
    	after a pseudo symbol with a one character name: #
    



                                                             3


    5        Liste des sp‚cifications non class‚es                       
    
      [module.c,202]
      #Sp‚cification: etranget‚
    
    	Pour fabriquer la table de r‚solution ‚vitant un
    	link multi-passe, on doit recueillir un symbole
    	par module qui ne serait pas charg‚ dŠs la premiŠre
    	passe.
    
    	Lorsqu'un module est charg‚ par ccld, si au moins
    	un de ses symboles publiques est d‚j… requis par
    	un module pr‚c‚dant lui-mˆme implicitement requis,
    	alors ce module sera aussi requis en une passe.
    
    	A la fin, les modules non-requis, mais contenant
    	des symboles requis sont forc‚s. Les symboles
    	externes de ce module deviennent requis (forceant
    	probablement d'autre modules).
    
    	Pour "forcer" un module, on fabrique un source C
    	temporaire qui r‚f‚rencera un des symboles publiques
    	du module.
    
    	Une ‚tranget‚: On essai de ne pas choisir de symbole
    	publique de type "common" parce qu'il ne semble
    	pas trŠs apte … "forcer" le module.
    
      [module.c,32]
      #Sp‚cification: librairies / nombre maximum
    
    	Un nombre maximum de 255 librairie est permis pour le link
