From owner-freebsd-drivers@FreeBSD.ORG Tue Apr 1 05:13:58 2008 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB56B1066191; Tue, 1 Apr 2008 05:13:51 +0000 (UTC) (envelope-from root@mmu.edu.my) Received: from staff.cyber.mmu.edu.my (staff.cyber.mmu.edu.my [203.106.62.12]) by mx1.freebsd.org (Postfix) with ESMTP id AD0A28FC14; Tue, 1 Apr 2008 05:13:50 +0000 (UTC) (envelope-from root@mmu.edu.my) Received: by staff.cyber.mmu.edu.my (Postfix, from userid 0) id 979A54D5672; Tue, 1 Apr 2008 13:07:44 +0800 (MYT) Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by mmu.edu.my (Postfix) with ESMTP id 4A97555E43D for ; Fri, 28 Mar 2008 05:06:18 +0800 (MYT) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 64A27163C07; Thu, 27 Mar 2008 21:05:38 +0000 (UTC) (envelope-from owner-freebsd-hackers@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1BCE510656F9; Thu, 27 Mar 2008 21:05:36 +0000 (UTC) (envelope-from owner-freebsd-hackers@freebsd.org) Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333B41065671 for ; Thu, 27 Mar 2008 21:05:25 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by mx1.freebsd.org (Postfix) with ESMTP id 04F868FC20 for ; Thu, 27 Mar 2008 21:05:24 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by wf-out-1314.google.com with SMTP id 25so4031809wfa.7 for ; Thu, 27 Mar 2008 14:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=hEJiW4kRPyNTGzHFYFkojk4UZOp9Wc3JtQGZ5dDmPLQ=; b=fAJS2JCJqcrmfbddTZ1oKoJzpn4gExn7EPiZf3NUbV0wv5FI80+zIAD6uM+/8LKf6bP/lgRZaNNJr8Cw/ol5WLEeY7Q50qPEq7EBu+EShTt4p97s/Se60qDrCtBZNrKGXwhmpoIrBN7lqlKDuL8qG3pL9QQ5DBBIJQQvWNccwp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aUOZYWTL1TREI6izI9/WnOurmfQ8yj7w09Q4xZaiubY/kQ6G0WbW4qrnWD99Lui1kjEcrr8HF4X14OQ57QjIC1hU7zNhyRR2oKBmM9fJlUU582Sy8kEkdK8q6fQDDVjlPiov8q43jPSyOJSO4D26HuYZlys9bMqiVzC1+3/5kHo= Received: by 10.142.43.7 with SMTP id q7mr1816811wfq.67.1206651924605; Thu, 27 Mar 2008 14:05:24 -0700 (PDT) Received: by 10.142.147.6 with HTTP; Thu, 27 Mar 2008 14:05:24 -0700 (PDT) Message-ID: <3c0b01820803271405r2351cbbwb20b8b35c5621dcb@mail.gmail.com> Date: Thu, 27 Mar 2008 17:05:24 -0400 From: "Alexander Sack" To: pluknet In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820803270851x24bfe739pea0bd4fb0ebecfb0@mail.gmail.com> <47EBF498.9090409@elischer.org> <3c0b01820803271252m488159ebi2af2255461f10358@mail.gmail.com> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-hackers@freebsd.org Errors-To: owner-freebsd-hackers@freebsd.org Cc: freebsd-hackers@freebsd.org, Julian Elischer , freebsd-drivers@freebsd.org Subject: Re: Stupid driver build/debug questions X-BeenThere: freebsd-drivers@freebsd.org List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 05:13:58 -0000 On Thu, Mar 27, 2008 at 4:39 PM, pluknet wrote: > > On 27/03/2008, Alexander Sack wrote: > > On Thu, Mar 27, 2008 at 3:25 PM, Julian Elischer wrote: > > > Alexander Sack wrote: > > > > Hello: > > > > > > > > New to the FreeBSD kernel and I'm investigating a driver problem > > > > (wasn't sure what list this should go on). > > > > > > > > I was wondering how to make a driver statically built instead of a > > > > loadable module? Is this an artifact of the driver source build or > > > > the generic kernel configuration mechanism via options etc.? i.e. > > > > does a driver need to use something different than the bsd.kmod.mk > > > > template make file to build a static driver. > > > > > > > > What I am trying to do is break at attach time more easily than > > > > stepping through driver_probe_and_attach()/driver_attach_child() until > > > > the attach routine gets called. I realize I can add a kdb_enter() but > > > > I was trying to do this on a live system without rebuilding the kernel > > > > (I understand this contradicts my first question but I still want to > > > > know how to build drivers statically). > > > > > > put the filennames in /sys/conf/files or files.i386 (or whatever) > > > > > > at one stage you could also have a files.{CONFIGNAME} but I haven't > > > tried that for a long time. > > > > > > Thanks for the response. I will try this but I do have an obvious > > question, the build scripts do not need to be edited at all with the > > extra directory/files? It will just pickup my driver directory and > > link against the kernel automagically? > > Yes, It will if you add them to standard files list (see conf/files). > (Otherwise if you want it as options directive in your kernel config > than you should mark its module name in conf/files and also put > an appropriate record into conf/options). Thank you very much, that is what I thought regarding it as an options directive instead of a driver - I just wanted some validation before going down that path. Again, thanks guys, -aps -- "What lies behind us and what lies in front of us is of little concern to what lies within us." -Ralph Waldo Emerson _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"