Posted by cadsmith on January 27, 2008
“Linux Device Drivers, 3rd Edition”, Corbet, Hroah-Hartman & Rubini, 2005, 636pp, outlines how software used to interface machines and devices is constructed. Drivers interface application software with the hardware through kernel functionality. The release 2.6 device model supports power management, user space communication, hotplugging, device classes and object lifecycles. The authors talk about how these are built, handle memory mapping and DMA, do signaling such as interrupts, run in a device bus and multi-process environment, and are refined. Chapters have a Quick Reference summary at end of each which lists header files and C function calls. Sample driver code is given for block, character and network devices represented by sbull, scull and snull, respectively. Details such as firmware download and portability issues are discussed. Particular hardware dependencies are listed across various processors, e.g. for I/O ports. Emphasis is on most popular drivers such as PCI, USB and, to a lesser extent, ISA. Kernel debugging talks about options to enable debugging modules, printing methods (printk, console, klog, syslog, /proc/kmsg), querying (ioctrl, /proc files), watching (strace, gdb, kgdb), system faults, hangs (sysrq key, kernel profiling), the user-mode linux port (UML) which runs a kernel in a user-space process, and linux trace toolkit (LTT) which allows event tracing, dynamic probes (DProbes). See commons.
Media and network devices that exist in multi-operating system environments, or require a particular OS, may also be of interest. The Ubuntu version of Linux 2.6 can be run on Windows machines booted either from a partition, CD, or file. Wubi is a downloadable install that brings up a desktop. Lubi can convert it to a partition. Contents written to the wubi filesystem are visible to windows, after reboot, and vice-versa, or can be shared via a removable device such as USB flash, network connection, server or web site.