From owner-freebsd-arch@FreeBSD.ORG Tue Jan 3 17:30:23 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ACDD106566B; Tue, 3 Jan 2012 17:30:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id DBD518FC15; Tue, 3 Jan 2012 17:30:22 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so21935458vbb.13 for ; Tue, 03 Jan 2012 09:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wLjRmBRnZWf7Bg9E7HTu8BTSz1A3qcqsJEPk8i3TZwU=; b=iwvFfHU08WHWE4gefKrrokdo3doEgRAmahF99ku7aPEpEWrMZOUokFcKPQKJetmZz1 T0ekW5s/UeoPukE3uDxlblF2JDu//6Q/gzkY69SjAD0mlHdoB8VGUThuiURk8DLXVBni UvMtUpsm2mztTXkErrXQ9s2fjJO/sE74HyONo= MIME-Version: 1.0 Received: by 10.52.23.44 with SMTP id j12mr18591105vdf.117.1325611822063; Tue, 03 Jan 2012 09:30:22 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Tue, 3 Jan 2012 09:30:22 -0800 (PST) In-Reply-To: <201201030924.44493.jhb@freebsd.org> References: <15285562-E9BA-431B-A2C1-D0547DFB2663@bsdimp.com> <201201030924.44493.jhb@freebsd.org> Date: Tue, 3 Jan 2012 09:30:22 -0800 X-Google-Sender-Auth: S3xynVEXk7yekFVk7CRk5MoJMW8 Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org Subject: Re: Request for help: how do teach module building about kernel options? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 17:30:23 -0000 On 3 January 2012 06:24, John Baldwin wrote: >> Working off the cuff, I'd propose the following API: >> >> KERNOPTS=3Dfoo baz >> SRC_FOO =3D foo.c >> SRC_BAZ =3D baz.c >> SRC=3D a.c b.c d.c >> >> And have the magic needed to conditionally add SRC_FOO and SRC_BAZ to SR= C in bsd.kern.mk. I'd be happy with the former to begin with, based on all the options. Devices would be nice too, but that can come later. How about: KERNOPTS=3Dfoo baz KERNDEVICES=3Da b c d e Or if we're goign for linux-like config.mk (which would save on line length issues, for very large kernel config files?): KERNOPTS_foo=3D KERNOPTS_bar=3DXXX KERNOPTS_baz=3DYYY > Not only that, but it would be nice if the list of modules to be built co= uld > be tailored to what options are enabled. =A0For example, if I build a ker= nel that > doesn't have inet or inet6 then it shouldn't try to build ipfw, etc. That'd be nice too, but it's almost like we'd need another domain specific language just to describe how to build sys/modules/Makefile. :-) So how about we do up say, the KERNOPTS field first, which would be a big win. Then KERNDEVICES too, if that's possible? Adrian