Drivers in Linux
This post was last updated on May 26th, 2020 at 10:43 pm
- 0.1 What to do with static drivers, module drivers, append=, and insmod.
- 0.2 Drivers in Linux can take on two forms:
- 0.3 Driver Built in Statically:
- 0.4 Driver Built as a Module:
- 0.5 Initrd:
- 0.6 Passing parameters to drivers built in statically in the kernel:
- 0.7 Passing parameters to drivers built as a module:
- 0.8 Notes about Parameters:
- 1 Real Life Examples of modular/static:
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.
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:
cpqarray/smart2 built in staticaly:
Real Life Examples of modular/static:
Cpqarray/smart2 loaded as a module:
alias scsi_hostadapter cpqarray options cpqarray eisa=0x6000
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.
You might also like
Large storage disks usually have logical partitions. An Operating System uses a partition table to identify the start address, filesystem information, and other details of a specific logical partition. The
This post was last updated on June 3rd, 2020 at 04:07 pmCommon Printer port settings are as follows: LPT Port I/O Address LPT1 378 LPT2 278 LPT3 3BC Compaq Servers