Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2004 12:23:01 -0800 (PST)
From:      Chris Miller <admin2@forkthepenguin.com>
To:        freebsd-questions@freebsd.org
Subject:   What makes a driver dynamically loadable? (fwd)
Message-ID:  <Pine.BSI.4.58L.0403171220280.5706@vp4.netgate.net>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.58L.0403171220280.5706>