From owner-freebsd-arch@FreeBSD.ORG Wed Jan 4 00:12: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 EA3D9106566C; Wed, 4 Jan 2012 00:12:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 820008FC08; Wed, 4 Jan 2012 00:12:23 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so22189803vcb.13 for ; Tue, 03 Jan 2012 16:12: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=JuONW7Fx/Ew6G/MUJrPv7UxqvRBuoH7NIfNVF1/zaAo=; b=LBirx1vmxfe5gkHzyEfjc2kDh8BEZiNos1ZaKbom2y36EcTovxVaeyRIyIoLOpTgxR 5DO7Lb5io7Ac0taIgwS2COvTQcIGXRPGxYrPmZjHqc+jQb7CsU0TDnitI6CfmPgS2WjJ 9h+CiF8H1tpXXqcxL3agDl7P4HmtxvYSwjNPU= MIME-Version: 1.0 Received: by 10.220.148.201 with SMTP id q9mr11092196vcv.33.1325635942667; Tue, 03 Jan 2012 16:12:22 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Tue, 3 Jan 2012 16:12:22 -0800 (PST) In-Reply-To: References: <15285562-E9BA-431B-A2C1-D0547DFB2663@bsdimp.com> <201201030924.44493.jhb@freebsd.org> Date: Tue, 3 Jan 2012 16:12:22 -0800 X-Google-Sender-Auth: n_S2lKTAu5uw6eTAjv3Zsd02i2I Message-ID: From: Adrian Chadd To: Warner Losh 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: Wed, 04 Jan 2012 00:12:24 -0000 On 3 January 2012 15:31, Warner Losh wrote: > Please find enclosed a proposed patch. =A0This will not build, of course,= since there's no file in the tree mesh_baby.c, so if you have IEEE80211_SU= PPORT_MESH defined, it won't work. =A0It keys off the actual define. > > It even works with devices (which define DEV_xxx), but only if you have i= t in the options file like isa (eg, you need to tell config to generate it)= . > > Comments? I don't strictly need the SRCS line just yet - I can wrap it up in an if: (not correct make fu, but you get the idea): .if (KERNOPT_IEEE80211_SUPPORT_MESH =3D=3D 1) SRCS+=3D ieee80211_mesh.c .endif .if (KERNOPT_IEEE80211_SUPPORT_TDMA =3D=3D 1) SRCS+=3D ieee80211_tdma.c .endif What do you mean about DEV_xxx? Can you give me an example to look at in the sys directory? Adrian