From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 04:20:10 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C0E106566B; Tue, 28 Oct 2008 04:20:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2B3DB8FC14; Tue, 28 Oct 2008 04:20:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9S4I01w008246; Mon, 27 Oct 2008 22:18:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Oct 2008 22:19:10 -0600 (MDT) Message-Id: <20081027.221910.1508179985.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200810271159.31843.jhb@freebsd.org> References: <200810241031.08780.jhb@freebsd.org> <20081024.164740.74747369.imp@bsdimp.com> <200810271159.31843.jhb@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Oct_27_22_19_10_2008_262)--" Content-Transfer-Encoding: 7bit Cc: danfe@FreeBSD.org, marcel@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 04:20:10 -0000 ----Next_Part(Mon_Oct_27_22_19_10_2008_262)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <200810271159.31843.jhb@freebsd.org> John Baldwin writes: : On Friday 24 October 2008 06:47:40 pm Warner Losh wrote: : > From: John Baldwin : > Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf : > Date: Fri, 24 Oct 2008 10:31:07 -0400 : > : > > On Friday 24 October 2008 09:27:03 am Alexey Dokuchaev wrote: : > > > On Fri, Oct 24, 2008 at 03:26:43AM +0200, Dag-Erling Sm??rgrav wrote: : > > > > Warner Losh writes: : > > > > > We already have a better mechanism for including config files. We : > > > > > should be using that instead of poluting another port with the : > > > > > DEFAULTS file. : > > > > : > > > > Should we even have DEFAULTS files at all? IMHO they just confuse : > > > > matters by introducing "stealth" options into your config. : > > > : > > > I tend to second this. I always try to get everything possible out of : > > > my kernel to modules, and thus was surprised to see io.ko and mem.ko : > > > fail to load because they were silently included into my custom kernel. : > > > : > > > I understand that some things like 'device isa' and : > > > 'device npx' aren't really optional, but if something is useful to have, : > > > but can be loaded as a module, it belongs to GENERIC rather than : > > > DEFAULTS. Killing the latter altogether and throwing a comment that : > > > says particular option or device is mandatory in GENERIC is probably : > > > even better (and more transparent). : > > : > > The one thing I think DEFAULTS is useful for are replacing NO_FOO options : with : > > FOO options. That is, if someone wants to turn a feature on by default, : I'd : > > rather them put 'options FOO' in DEFAULTS rather than rename all the : > > #ifdef's,e tc. to '#ifndef NO_FOO'. : > : > Wouldn't it be better to move to a system where we explicitly include : > std.i386 and have them all defined there? We already encourage stuff : > like this with advice to include GENERIC with nodev... : : I wouldn't mind a std.i386, and if we make config's include keyword fall back : to 'sys/conf' for relative path name lookups if the lookup in '.' fails then : you can even put those files in sys/conf with the still-clean syntax : of 'include std.i386'. Already works that way... : However, I don't know about you, but I _never_ build a config by including : GENERIC and then weeding stuff out. Too much stuff to weed out. Once I have : a customized config for a machine I then include that in development branches : to install kernels to different directories under /boot, etc. Yea, Well, I was thinking of std.firewire, et al. Trouble is we'd then have to slice thing by bus (std.pccard, std.cardbus, std.pci, std.iic, std.usb) and by function (std.wireless, std.scsi, std.serial) which slices across different functional groups... Warner P.S. Here's a diff of something we can do today... This is just a quickie demo, not a proposed patch to the tree... It also assumes that we have nocpu defined in config, which I haven't verified. ----Next_Part(Mon_Oct_27_22_19_10_2008_262)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="defaults.diff" Index: conf/std.i386 =================================================================== --- conf/std.i386 (revision 0) +++ conf/std.i386 (revision 0) @@ -0,0 +1,33 @@ +# +# DEFAULTS -- Default kernel configuration file for FreeBSD/i386 +# +# $FreeBSD: head/sys/i386/conf/DEFAULTS 181776 2008-08-15 20:58:57Z kmacy $ + +machine i386 + +# Default CPU support +cpu I486_CPU +cpu I586_CPU +cpu I686_CPU + +# Bus support. +device isa +options ISAPNP + +# Floating point support. +device npx + +# Pseudo devices. +device mem # Memory and kernel memory devices +device io # I/O device + +# UART chips on this platform +device uart_ns8250 + +# Default partitioning schemes +options GEOM_BSD +options GEOM_MBR + +# enable support for native hardware +options NATIVE +device atpic Index: i386/conf/DEFAULTS =================================================================== --- i386/conf/DEFAULTS (revision 184107) +++ i386/conf/DEFAULTS (working copy) @@ -1,28 +0,0 @@ -# -# DEFAULTS -- Default kernel configuration file for FreeBSD/i386 -# -# $FreeBSD$ - -machine i386 - -# Bus support. -device isa -options ISAPNP - -# Floating point support. -device npx - -# Pseudo devices. -device mem # Memory and kernel memory devices -device io # I/O device - -# UART chips on this platform -device uart_ns8250 - -# Default partitioning schemes -options GEOM_BSD -options GEOM_MBR - -# enable support for native hardware -options NATIVE -device atpic Index: i386/conf/GENERIC =================================================================== --- i386/conf/GENERIC (revision 184107) +++ i386/conf/GENERIC (working copy) @@ -18,9 +18,8 @@ # # $FreeBSD$ -cpu I486_CPU -cpu I586_CPU -cpu I686_CPU +include "std.i386" + ident GENERIC # To statically compile in device wiring instead of /boot/device.hints ----Next_Part(Mon_Oct_27_22_19_10_2008_262)----