From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 07:08:14 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4079E6BF for ; Sat, 15 Mar 2014 07:08:14 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB953849 for ; Sat, 15 Mar 2014 07:08:13 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id e16so2450054lan.30 for ; Sat, 15 Mar 2014 00:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9ujkg8b1rD6W+9Iv2IP24uq3pv0ft9BfqLgM4slbnSQ=; b=evaeYrFXX5d5XzUonFHmHf4IOkfubwowxABpbKevTNL0kIMqjFBzID5XMtRkqAVLpq IlQrSnt6yoJxTV70RLup/dd5uYJvecazxDoHS8u6MVxkAKGkxBQLVcP9MEVivRwE4536 Yu1SWxmM1W9wawQUmPK+yWwq2/8u1kNkKtLT2tFcvRC5m7f/PLssiFrEHxVHD2dJiQXs hClNO+nXkod+2+pjvUM+NmZTlLvgTk1YnVxDhWjDmG4ccdDm7sYHGFg85zzYyNyLtg3l yriRrpwgaFQanWLeXqc/L6lZCykhHfMpgzTRWWik9JVFovqBrIGWSlF00jONxGrR7yqb hFCQ== MIME-Version: 1.0 X-Received: by 10.152.170.137 with SMTP id am9mr8715581lac.15.1394867291837; Sat, 15 Mar 2014 00:08:11 -0700 (PDT) Received: by 10.112.209.37 with HTTP; Sat, 15 Mar 2014 00:08:11 -0700 (PDT) In-Reply-To: <20140315062753.GE6674@nbu> References: <20140315001820.GB5765@nbu> <20140315062753.GE6674@nbu> Date: Sat, 15 Mar 2014 15:08:11 +0800 Message-ID: Subject: Re: Overhaul the config system with Lua From: =?UTF-8?B?5pyx5rGf?= To: Walt Ford , freebsd-hackers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 07:08:14 -0000 For now, I plan to implement following functionality: 1. basic functionality as old config 2. support dependencies 3. improve support for ARM platform 4. support conditionals (e.g. if something then .... else ....) 5. keep object files so that next time we can reuse the unchanged object files. 2014-03-15 14:27 GMT+08:00 Walt Ford : > On Sat, Mar 15, 2014 at 01:27:37PM +0800, =E6=9C=B1=E6=B1=9F wrote: > > > > Your experience is very helpful to me. Can you provide more detail abou= t > > your work? And I can learn something from your work. > > Sure, but my work was mainly to give a unified appearance to those base > utilties that either provide statistics, control subsystems, or configure > devices. Unfortunately, config(8) doesn't really implement any of that. > The user interface code could be reuseable, but config only has a > command-line interface right now. > > If you work on this, even though FreeBSD doesn't have Lua in the base > system, then in addition to moving the knowledge of options into config(8= ), > the logic used to determine proper option defaults based on architecture > and other options selected should go too. It's currently in a Makefile. > Ideally, that would be part of config as well so the same utility could > be used to configure a kernel to build using make(1) or to configure a > custom binary kernel to install using pkg(8). It's currently not > possible to do that, but we're getting closer. Options and the logic > controlling them should be accessible without a source tree installed. > > Let me know what you're planning to implement and I'll see what can be > reused. > > -- > Walt > --=20 Jiang Zhu mail.jiang.cn@gmail.com