From owner-freebsd-current@FreeBSD.ORG Fri Aug 15 10:40:10 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 1AA0937B401 for ; Fri, 15 Aug 2003 10:40:10 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70C5943FA3 for ; Fri, 15 Aug 2003 10:40:09 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 23355 invoked from network); 15 Aug 2003 17:40:08 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 15 Aug 2003 17:40:08 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h7FHe49s070275; Fri, 15 Aug 2003 13:40:06 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030814.224014.08945805.imp@bsdimp.com> Date: Fri, 15 Aug 2003 13:40:26 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" cc: lchen@briontech.com cc: current@freebsd.org cc: gallatin@cs.duke.edu Subject: Re: Change to kernel+modules build approach 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: Fri, 15 Aug 2003 17:40:10 -0000 On 15-Aug-2003 M. Warner Losh wrote: > In message: > John Baldwin writes: >: >: On 14-Aug-2003 Andrew Gallatin wrote: >: > >: > John Baldwin writes: >: > > >: > > On 14-Aug-2003 Ruslan Ermilov wrote: >: > > > On Thu, Aug 14, 2003 at 02:10:19AM -0600, Scott Long wrote: >: > > >> Luoqi Chen wrote: >: > > > [...] >: > > >> >On the other hand, all modules should create all the opt_*.h files >: > > >> >it needs when built individually. Add opt_ddb.h to nullfs's Makefile >: > > >> >should fix the breakage. >: > > >> > >: > > >> Our kernel build system isn't set up to handle passing config options >: > > >> to modules. Various solutions to this have been proposed, but nothing >: > > >> has appeared yet. In 5.x, we document that modules will not work with >: > > >> PAE. >: > > >> >: > > > How does the below look? This is basically a more generic implementation >: > > > of Luoqi's idea, but for -CURRENT: >: > > >: > > I would prefer something far more radical that would involve moving >: > > all the module metadata to sys/conf (i.e. removing sys/modules) and >: > > building all the modules based on a single kernel config file. >: > >: > Would this tie modules to that kernel config? If so, would it mean >: > the end of the ability of 3rd party developers to ship binary drivers >: > and expect them to work with any kernel? >: >: Well, yes, but, one could always build generic modules by using >: a kernel config containing 'options KLD_MODULE' or some such. >: This would allow one to compile optimized modules if they wanted to, >: but still provide the ability to build fully generic modules. > > This sounds like an either or choice. I don't care too much if the > third party drivers aren't hyper optimzied for my kernel. But to > force users of them to use some generic kernel would be a big support > nightmare. No, generic modules would always work with all kernels except for exceptional cases like PAE (unavoidable, really), and MUTEX_PROFILING (this is a debugging thing, so ISV's wouldn't need to ship modules with that turned on). All this would add is the ability to build modules optimized for your current kernel. If this is not super desired (which I wouldn't mind), then I think we should take the modules out of /boot/kernel and put them in /boot/modules or some such. I do want to get the metadata down to one copy somehow though. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/