Drivers in Linux
Updated September 16, 2002
Created November 19, 2001


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

What to do with static drivers, module drivers, append=, and insmod.

Drivers in Linux can take on two forms:



Driver Built in Statically:

Any drivers that are built in statically in the kernel are always loaded. This means that this causes the total amount of memory the kernel uses to be greater than a kernel with those same drivers built in as a module. It is ok to have some drivers built in statically and others built in as modules.

Driver Built as a Module:

Drivers built in as a module are able to be loaded when needed and unloaded when not needed. This conserves the amount of memory that the entire kernel needs. It is ok to have some drivers built in statically and others built in as modules.

Initrd:

An initrd is an initial ramdisk. If you have your SCSI drivers loaded as a module then you need an initrd in order to boot your system. An initrd is not usually required for an IDE system. If your SCSI drivers are built in statically to the kernel, then an initrd isn't required.

Passing parameters to drivers built in statically in the kernel:

If you need to pass parameters to a driver that is built in statically in the kernel, then there are two locations to do this:

Note: A driver built in statically will never look in /etc/conf.modules for parameters. Any parameters put there for a static driver will not be read.

Passing parameters to drivers built as a module:

If you need to pass parameters to a driver built as a module, then there are two ways to do this.

Normally you will put parameters to be passed to driver modules into /etc/conf.modules. Then when the driver tries to load, it reads that file and processes those parameters.

If you are loading a modular driver manually, then you can either put the correct parameters in /etc/conf.modules or include it as part of the insmod string.

Note: A driver built in as a module will never read the LILO boot prompt, nor the append= lines for parameters. Any parameters put there for the moduler driver will not be read.

Notes about Parameters:

Quite often parameter names will change based on the fact if it is for a static driver or a modular driver. Here is one example of how the parameter names differ:

cpqarray/smart2 as a module:
eisa=0x5000

cpqarray/smart2 built in staticaly:
smart2=0x5000

Real Life Examples of modular/static:

Cpqarray/smart2 loaded as a module:

Cpqarray/smart2 built in statically:

boot=/dev/ida/c0d0p1
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux

image=/boot/vmlinuz-2.2.12-20
        label=linux
        root=/dev/ida/c0d0p6
        initrd=/boot/initrd-2.2.12-20.img
        append="smart2=0x5000 mem=48M"
        read-only

other=/dev/ida/c0d0p3
        label=scu
        table=/dev/ida/c0d0
Note the append= line, we put smart2= which is the correct format for the smart2 driver. Also note we put mem=48M, on most EISA systems, you would need to specify the amount of memory in the system in order to get more than 16MB of memory recognized.
Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html