From owner-freebsd-current@FreeBSD.ORG Tue Apr 22 05:54:34 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DD2637B401 for ; Tue, 22 Apr 2003 05:54:34 -0700 (PDT) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3562C43FBF for ; Tue, 22 Apr 2003 05:54:32 -0700 (PDT) (envelope-from dcs@tcoip.com.br) Received: from tcoip.com.br ([10.0.2.6]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id h3MCrw900808; Tue, 22 Apr 2003 09:53:58 -0300 Message-ID: <3EA53B66.2070709@tcoip.com.br> Date: Tue, 22 Apr 2003 09:53:58 -0300 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4a) Gecko/20030416 X-Accept-Language: en-us, en, pt-br, ja MIME-Version: 1.0 To: "M. Warner Losh" References: <3E9EB7DF.4040104@tcoip.com.br> <20030417.205459.78025666.imp@bsdimp.com> <3EA531A0.3060209@tcoip.com.br> <20030422.064548.89803373.imp@bsdimp.com> In-Reply-To: <20030422.064548.89803373.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: Auto kernel module loading X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2003 12:54:34 -0000 Ok. MMmmm. Damn, I want this. :-) M. Warner Losh wrote: > In message: <3EA531A0.3060209@tcoip.com.br> > "Daniel C. Sobral" writes: > : M. Warner Losh wrote: > : > In message: <3E9EB7DF.4040104@tcoip.com.br> > : > "Daniel C. Sobral" writes: > : > : Plan once was for loader to identify the PNP IDs and load the > : > : appropriate modules. What the appropriate modules were would be infered > : > : from a configuration file. > : > : > : > : I think Mike decided that wasn't such a good idea after all, but I > : > : wasn't much in touch with FreeBSD at the time, so I remember it only > : > : vaguely. > : > > : > Yes. My plan is to make devd deal with most of the problem... You'll > : > still need to compile / device into your kernel, however. > : > : Mmmm? The point is having a minimal kernel.ko. If you still have to > : compile the device in the kernel, it does nothing at all to reach the > : desired goal. > > You misunderstand. I have a fairly minimal kernel.ko. You have to > compile "/ device" into your kernel means that you have to compile the > device that you get your "/" partition from. > > Sorry if that didn't parse. > > Right now I have kinda gross things like the following in my devd.conf > file: > > nomatch 10 { > match "bus" "cardbus[0-9]+"; > match "vendor" "0x10b7"; > match "device" "0x5257"; > action "kldload if_xl"; > }; > > nomatch 10 { > match "bus" "pccard[0-9]+"; > match "manufacturer" "0x015f"; > match "product" "0x000a"; > action "kldload if_an"; > }; > > I've just gotten this working with devd, so I've not had a chance to > optimize things completely at this point in time. However, the above > entries have allowed me to compile a minimal kernel.ko and have the > devices loaded on demand. I don't bother trying to unload them on > last use, however, since that is a big pita... > > Warner -- Daniel C. Sobral (8-DCS) Gerencia de Operacoes Divisao de Comunicacao de Dados Coordenacao de Seguranca VIVO Centro Oeste Norte Fones: 55-61-313-7654/Cel: 55-61-9618-0904 E-mail: Daniel.Capo@tco.net.br Daniel.Sobral@tcoip.com.br dcs@tcoip.com.br Outros: dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net Return on investments won't.