Physically and electronically, the I/O Kit is composed of many parts: frameworks and libraries, development and testing tools, and informational resources such as example projects, documentation, and header files. This section catalogs these parts and indicates where they are installed and how they can be accessed.
Frameworks and Libraries
Applications and Tools
Other I/O Kit Resources
The I/O Kit is based on three C++ libraries. All of them are packaged in frameworks, but only IOKit.framework is a true framework. The Kernel framework exists primarily to expose kernel header files, including those of libkern and IOKit. The code of these “libraries” is actually built into the kernel; however, drivers (when loaded) do link against the kernel as if it were a library.
Framework or library | Description and location |
|---|---|
Kernel/IOKit | The library used for developing kernel-resident device drivers. Headers location: |
Kernel/libkern | The library containing classes useful for all development of kernel software. Headers location: |
The framework used for developing device interfaces. Location: |
You use a handful of development applications to build, manage, debug, examine, and package device drivers. Table 1-2 lists the applications used in driver development; these applications are installed in /Developer/Applications.
Table 1-3 describes the command-line tools used in developing device drivers with the I/O Kit; all tools are located in /usr/sbin/ or /sbin.
Note: You can view on-line documentation of these tools (called man pages in the UNIX world) by entering a command in the shell provided by the Terminal application. The command is man, and the main argument to the man command is the name of the tool for which you want to see documentation. For example, to see the man page for the kextload tool, enter the following line in Terminal:
man kextload
Tool | Description and location |
|---|---|
Prints the contents of the I/O Registry (a command-line version of the I/O Registry Explorer application). | |
Loads a kernel extension (such as device driver) or generates a statically linked symbol file for remote debugging. | |
Unloads a kernel extension (if possible). | |
Prints statistics about currently loaded drivers and other kernel extensions. | |
Displays kernel I/O statistics on terminal, disk, and CPU operations. | |
Displays instance count of a specified class. | |
Displays some accounting of memory allocated by I/O Kit objects in the kernel. | |
Compresses and archives kernel extensions (including drivers) so they can be automatically loaded into the kernel at boot time. See Loading Kernel Extensions at Boot Time. | |
Apple’s version of the GNU C++ compiler; Xcode automatically invokes it with the correct set of flags for I/O Kit projects. | |
Apple’s version of the GNU debugger; Xcode automatically invokes it with the correct set of flags for I/O Kit projects. |
Several informational resources are included with the I/O Kit “product,” particularly documentation and header files. Some of these resources are described in the preceding chapter, “Introduction to I/O Kit Fundamentals”
The I/O Kit is part of the Darwin Open Source project. Apple maintains a website where you can find much information related to the I/O Kit and other Open Source projects managed by Apple. The following two locations are of particular interest:
Open Source Projects—http://developer.apple.com/darwin/projects/
Here you can find links to the Darwin and Darwin Streaming projects, among other projects. Also featured are links to documentation and tools.
Mailing lists—http://developer.apple.com/darwin/mail.html
This page features links that will put you on the Darwin-Development and DarwinOS-Users mailing lists, among others.
Last updated: 2007-05-17