What are modules - (cont'd) ?
billlinux at rogers.com
Thu Sep 27 01:04:53 UTC 2007
Mikkel L. Ellertson
<mikkel at infinity-ltd.com>
For users of Fedora
<fedora-list at redhat.com>
Re: Moving F7
Wed, 26 Sep 2007
"Before that can be answered, we need your definition of drivers.
Kernel modules can provide an interface between the kernel and
hardware. (Driver?) They can let the kernel access different file
system formats. They can let the kernel use different networking
protocols. They extend the function of the kernel. Most modules can
also be built into the kernel instead.
Modules have a defined format. Most modules are written specifically
for use by the Linux kernel, and are not drivers designed for
something else with a C wrapper around them. (There are modules that
are basically wrappers that let you use other format drivers.)
Unless extra steps are taken, modules are limited to the version of
the kernel they were compiled ageist. Some kernel options also make
a difference. For example, a 64 bit module in not going to work on a
32 bit processor, or be loadable by a 32 bit kernel.
It is possible to build a kernel that does not have any loadable
modules, or even support for loadable modules. This works well for
embedded systems where the requirements are not going to change.
For a laptop, it may make sense to build a kernel optimized for the
processor in the laptop, build in support for the hardware in that
laptop, and for the file systems always used. You would only enable
modules for the hardware you expect to be using. (No support for PCI
or ISA SCSI controllers, or multi-port serial cards. But maybe
support for PCMCIA and/or cardbus SCSI cards.)
But while a custom kernel may make sense for a specific machine, it
does not make sense for a distribution's kernel. So most things are
build as modules, and you load the modules for your specific needs.
Before that can be answered, we need your definition of drivers.
"A device driver, or software driver is a computer program allowing
higher-level computer programs to interact with a computer hardware
A driver typically communicates with the device through the computer bus
or communications subsystem to which the hardware is connected. When a
calling program invokes a routine in the driver, the driver issues
commands to the device. Once the device sends data back to the driver,
the driver may invoke routines in the original calling program. Drivers
are hardware-dependent and operating-system-specific. They usually
provide the interrupt handling required for any necessary asynchronous
time-dependent hardware interface."
I am not being pedantic. The above wikipedia quote pretty well sums up
my understanding of a (device) driver.
My simplest example of the driver versus module question is:
I have a NVIDA graphics chip integrated into my mother board. xorg.conf
tells me I am using the Fedora "nv" driver. I want to try out Beryl. I
have been told to download the "nvida" proprietary driver through
livna.repo. How do those two drivers fit in with the use of modules in
the kernel? If those particular drivers are not applicable to the
question, you should be able to, nonetheless, see what I am getting at.
More information about the users