Next | Prev | Up | Top | Contents | Index
Creating Kernel-level Device Drivers
If you decide to write a kernel-level device driver, you need to become familiar with the software environment, conventions, and data structures that apply to device drivers running under the IRIX operating system. To create a kernel-level driver from scratch, you must:
- Create a device-special file.
- Create a master file.
- Write and compile the driver code (-coff)[4].
- Create a kernel that includes the driver object code.
- Reboot using the new kernel.
- Debug the driver.
Steps 4 and 5 may be omitted if the driver is loadable. See Chapter 11, "Kernel-level Dynamically Loadable Modules (DLMs)," on how to make a device driver loadable.
Except for step 3, all the steps in this procedure are simple and mechanical.
[4] Compile the object file with the -coff compiler flag for all IRIX 5.x drivers but not for IRIX 6.0 drivers. While Indigo and Indigo2 platforms require this flag, IRIX 64-bit compilers do not support it. For the most appropriate flags for various system configurations, see the file /var/sysgen/Makefile.kernio.
Next | Prev | Up | Top | Contents | Index