Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2012 09:30:22 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Request for help: how do teach module building about kernel options?
Message-ID:  <CAJ-VmondtfzqRhD5nFZuHYJOc91sKM4BKhkVZsq0w4bgtDTFvw@mail.gmail.com>
In-Reply-To: <201201030924.44493.jhb@freebsd.org>
References:  <CAJ-Vmomk4JTnZ0avRqdte9Th5F7G7x9eWTcwcd%2BT4HrcE0Mgxw@mail.gmail.com> <15285562-E9BA-431B-A2C1-D0547DFB2663@bsdimp.com> <201201030924.44493.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3 January 2012 06:24, John Baldwin <jhb@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmondtfzqRhD5nFZuHYJOc91sKM4BKhkVZsq0w4bgtDTFvw>