From owner-freebsd-current Sun Dec 22 16:22:12 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id QAA28261 for current-outgoing; Sun, 22 Dec 1996 16:22:12 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id QAA28247 for ; Sun, 22 Dec 1996 16:22:08 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id BAA17171; Mon, 23 Dec 1996 01:21:10 +0100 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id BAA05358; Mon, 23 Dec 1996 01:21:10 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id BAA20781; Mon, 23 Dec 1996 01:07:38 +0100 (MET) From: J Wunsch Message-Id: <199612230007.BAA20781@uriah.heep.sax.de> Subject: Making an option `supported' To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Mon, 23 Dec 1996 01:07:38 +0100 (MET) Cc: toor@dyson.iquest.net (John S. Dyson) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199612222341.SAA00651@dyson.iquest.net> from "John S. Dyson" at "Dec 22, 96 06:41:37 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk (I dare to send this in public, since i don't assume i'd violate any privacy... but think there's public demand for it.) As John S. Dyson wrote: (regarding how to make a kernel option `supported') > Thanks, I didn't even know what was necessary to do it. Well, fairly simple: First, edit sys/conf/options (or sys/i386/conf/options.i386), and select an opt_foo.h file where your new option would best go into. If there's already something that comes close to the purpose of the new option, pick this. As for the MAXDSIZ option, i felt that opt_rlimit.h was a good choice (the OPEN_MAX and CHILD_MAX options already went there). If there's no opt_foo.h already available for the intended new option, invent a new name. Make it meaningful, and comment the new section in the options[.i386] file. config(8) will automagically pick up the change, and create that file next time it is run. Packing too many options into a single opt_foo.h will cause too many kernel files to be rebuilt when one of the options has been changed in the config file, while creating too many opt_foo.h's does apparently no good either. Finally, find out which kernel files depend on the new option. find /sys -name type f | xargs fgrep NEW_OPTION is your friend in finding them. Go and edit all those files, and add #include "opt_foo.h" _on top_, before all the #include stuff. The sequence is most important in case the options will override some defaults from the regular include files, where the defaults are protected by #ifndef NEW_OPTION #define NEW_OPTION (something) #endif in the regular header. The purpose of all this procedure is that we can eventually kill the ugly removal of the compile directory again in the next release, since changing any supported option in the config file will be automatically picked up again during the compilation by all the dependencies. Of course: "Don't forget to do a ``make depend''." :-) (Right now, the options UFS etc. are the worst offenders.) p.s.: Where in the docs would this notice go best into? -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)