From owner-freebsd-questions@FreeBSD.ORG Wed Mar 17 12:23:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFB2E16A4CE for ; Wed, 17 Mar 2004 12:23:01 -0800 (PST) Received: from vp4.netgate.net (vp4.netgate.net [205.214.170.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC19D43D2D for ; Wed, 17 Mar 2004 12:23:01 -0800 (PST) (envelope-from admin2@forkthepenguin.com) Received: from localhost (ibrew@localhost) by vp4.netgate.net (8.11.6/8.11.7) with ESMTP id i2HKN1r27058 for ; Wed, 17 Mar 2004 12:23:01 -0800 (PST) Date: Wed, 17 Mar 2004 12:23:01 -0800 (PST) From: Chris Miller X-X-Sender: ibrew@vp4.netgate.net To: freebsd-questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: What makes a driver dynamically loadable? (fwd) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2004 20:23:02 -0000 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