What makes a driver dynamically loadable? (fwd)

Chris Miller admin2 at forkthepenguin.com
Wed Mar 17 12:23:02 PST 2004


I'm working on a custom device driver. I've created my source files in the
/usr/src/sys/dev tree as well as created a corresponding directory in
/usr/src/sys/modules with a Makefile, and updated the parent Makefile. I
can indeed generate a kernel object and load it into the active kernel,
but it doesn't appear to get called when my device (USB in this case) is
attached. If I add my device to the kernel conf file and build a custom
kernel, it works fine.

I've used other device drivers as a template and have included all the
declarations the appear to be necessary :

USB_DECLARE_DRIVER(ulabjack);
DRIVER_MODULE(ulabjack, uhub, ulabjack_driver, ulabjack_devclass,
usbd_driver_load, 0);

During my development it's a lot easier to load/unload/modify the driver
without recompiling the kernel. So what step am I missing?

Chris


More information about the freebsd-questions mailing list