Device Drivers: Building and Installing a Kernel Driver

The section tells you how to prepare, compile, and install your kernel driver.

      __declspec(dllexport)
      status_t init_hardware(void);

When an attempt is made to open a device, the kernel first looks for the driver for that device among those already loaded into memory. Failing that, the kernel looks for a driver in the following directories (in this order):

1. /beos/system/add-ons/kernel/drivers (on a floppy)

2. /boot/home/config/add-ons/kernel/drivers

3. /boot/beos/system/add-ons/kernel/drivers

Finished, publishable drivers should be installed in #2, /boot/home/config/add-ons/kernel/drivers. Do not install in the beos/system directory.

Once your driver has been installed, it is available immediately; there is no need to restart the system, unless you are replacing a driver that has previously been installed and loaded into memory.






The Be Book, in lovely HTML, for BeOS Release 3.

Copyright © 1998 Be, Inc. All rights reserved.

Last modified March 27, 1998.