From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 20 14:12:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90ECE16A401 for ; Mon, 20 Mar 2006 14:12:00 +0000 (UTC) (envelope-from zazubrik@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [194.67.23.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDDB843D48 for ; Mon, 20 Mar 2006 14:11:59 +0000 (GMT) (envelope-from zazubrik@mail.ru) Received: from [85.140.226.112] (port=37803 helo=timon) by mx27.mail.ru with esmtp id 1FLL70-0008Y4-00 for freebsd-hackers@freebsd.org; Mon, 20 Mar 2006 17:11:58 +0300 From: Artem 'ZaZooBred' Ignatiev To: freebsd-hackers@freebsd.org In-Reply-To: <200603161548.11127.hackers@dino.sk> References: <1142506792.36931.25.camel@timon> <1142510785.36931.43.camel@timon> <1142517420.36931.58.camel@timon> <200603161548.11127.hackers@dino.sk> Content-Type: text/plain Date: Mon, 20 Mar 2006 17:11:57 +0300 Message-Id: <1142863917.2212.7.camel@timon> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: newbus questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 14:12:00 -0000 On Thu, 16/03/2006 at 15:48 +0100, Milan Obuch wrote: > > Looks like I'm totally newbie there. I've created small saa_if.m file, > > with CODE section, declaring two small debug functions, and two METHODS, > > DEFAULTing to that functions. Now I want to update Makefile so that > > typing ``make depend'' will produce .c and .h from the .m file. Looks > > like /sys/conf/kmod.mk lists all .m files by name, and deals with them > > on one-by-one basis, so I must manually insert all that awk -f ... > > invocations for these targets, am I right? > Not necessarily. You should put saa_if.m into kmod.mk, yes, but you should > actually somewhere use it. > > > Or had I overlooked feature of automated codegeneration just in > > Makefile? > > Could you show your Makefile? I think you are missing something there - like > saa_if.h and saa_if.c, maybe... well, I've just added 'saa_if.c saa_if.m' to SRCS, and defined two targets: .m.h: awk -f @/tools/makeobjops.awk ${.ALLSRC} -h .m.c: awk -f @tools/makeobjops.awk ${.ALLSRC} -c and now it works. I would also like to thank you for tip to call device_add_child manually, after that my subdriver automatically found the device to probe. > > P.S. I suppose, that it's worth to create some useful doc with skeleton > > bus driver, one dummy method, and child driver overriding that method. > > (As to me, the latest task is the easiest, at least I know how to do > > this, e.g., PCI device overriding probe method). > > Any idea how? Maybe manpage patch? You know, every one welcomed :) I think it will be a small article, with skeleton of bus device driver and skeleton of driver for device on that bus, since that is really easy once you know how. > > P.P.S Hey, that's my birthday! So I would like a toast to all BSD > > developers, core team and hackers > Mnoga ljeta, mnoga ljeta, mnoga ljeta... :) Thanks!