Chapter 3: Configuring Devices

Linux is a powerful operating system, and much of that power comes from its ability to support different hardware configurations and peripheral devices. Everything from multiple CPUs and video cards to printers and scanners require device drivers and kernel modifications. In this chapter, we'll look at getting some common devices configured properly.

Working with Device Drivers

Under Linux, there are a couple of required elements for working with devices. First, you need a kernel driver that can recognize the device. These are usually low-level drivers, such as support a parallel port (for example, for use with a parallel printer) or provide USB support (regardless of the USB device).

The second element depends on the type of hardware-some devices need software support for managing the device. The kernel driver only knows how to address the device; the software driver actually speaks the right language. This means that different versions of the same device may speak different languages but communicate over the same kernel driver. Printers are one such example. A printer may use PostScript, HP PCL, oki182, or some other format to communicate data. The kernel driver knows how to send data to the printer, but the software driver knows what data to send. The same is true for most scanners, cameras, pointer devices, and even keyboards.

The final element is the user-level application that accesses the device. This is the program that says "print" or the audio system that says "play."

There are four steps needed before using any device:

  1. Install a device driver, if one is not already installed.

  2. Create a device handle if one is not created automatically.

  3. Load any required software drivers and configuration parameters.

  4. Configure applications as necessary for using the device.

In some cases, some or all of these steps are automated. In other cases, devices will need manual configuration.




Copyright @ 2007 OpenSourceProject.org.cn.部分作品为网上收集整理,供开源爱好者学习使用,如侵犯了您的权益,请联系chinaperl@gmail.com,本站将立即删除。