From owner-freebsd-arch@FreeBSD.ORG Sun Mar 28 01:41:07 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4173416A4CE for ; Sun, 28 Mar 2004 01:41:07 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7ACC343D1D for ; Sun, 28 Mar 2004 01:41:00 -0800 (PST) (envelope-from phantom@FreeBSD.org.ua) Received: from phantom.cris.net (phantom@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i2S9eqZI040452; Sun, 28 Mar 2004 12:40:54 +0300 (EEST) (envelope-from phantom@FreeBSD.org.ua) Received: (from phantom@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i2S9eoht040451; Sun, 28 Mar 2004 12:40:50 +0300 (EEST) (envelope-from phantom) Date: Sun, 28 Mar 2004 12:40:48 +0300 From: Alexey Zelkin To: arch@FreeBSD.org Message-ID: <20040328094048.GA40406@phantom.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 4.9-STABLE i386 User-Agent: Mutt/1.5.5.1i Subject: CFD: XMLification of NOTES X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 09:41:07 -0000 hi, This weekend I have got some spare time (due to illness) and in order to get some rest from current tasks decided to pass thru old TODO file. Most interesting task got my attention was old item related to XMLification NOTES. Important advantage of this step (IMO) is to provide possibility to check dependency/conflicts of kernel configuration file to end users. Another possible advantage is great simplification of task writing GUI kernel configurator. If somebody volunteer, I'd be happy to write code related to XML handling (in case if current code not enough). Since -CURRENT now has libexpat imported (thanks Poul-Henning) I decided to give it a try. Now I have machine-independent and i386-machdep NOTES converted to XML format (described below) and wrote basic code which loads, validate XML (I have found that libexpat's support for DTD is very basic and it does not provide possibility to check if XML file completely conforms to DTD) and generate LINT which is almost same to LINT generated using current way). The only difference is order of entries, but 'sort -u' on both LINTs gives same result. At this point I would like to start some kind of discussion and listen for your ideas which features you'd like to see in application which will be handling these XMLs. I propose to have following ones: . basic validation of specific or all XML files (all NOTES files). . LINT generation for specific architecture . checking of provided kernel configuration file against NOTES a) check for missing dependencies b) check for conflicting options c) warn about obsolete options (missing in NOTES.xml) . check for missing dependencies. Not sure yet about method, but I think following way would work for us: a) generate set of kernel configuration files each containing 'required' kernel options (machine, ident, maxusers, etc) b) put one option/device and its dependencies into this file c) config/compile it. if compile fails, then assume that some dependency is missing. find missing dependency and register it into XML file. . check for missing conflicts. Not sure about this. Ideas are welcome! . PUT YOUR ENTRY HERE! According XML structure. It should look like:
Section Title Multiline section description Entry title Entry description
For example (two random entries):
Symmetric MultiProcessor (SMP) Support SMP enables building of a Symmetric MultiProcessor Kernel SMP kernel This option enables building of SMP kernel Do not inline mutex operations MUTEX_NOINLINE forces mutex operations to call functions to perform each operation rather than inlining the simple cases. This can be used to shrink the size of the kernel text segment. Note that this behavior is already implied by the INVARIANT_SUPPORT, INVARIANTS, MUTEX_PROFILING, and WITNESS options.
-- /* Alexey Zelkin && Independent Contractor */ /* phantom(at)FreeBSD.org && http://www.FreeBSD.org/java */ /* phantom(at)cris.net && http://www.FreeBSD.org.ua/ */