From owner-freebsd-arch@FreeBSD.ORG Thu Nov 1 22:31:51 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14D8C5B3 for ; Thu, 1 Nov 2012 22:31:51 +0000 (UTC) (envelope-from 2ohohoho@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id D95978FC14 for ; Thu, 1 Nov 2012 22:31:50 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2182477pbb.13 for ; Thu, 01 Nov 2012 15:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=iOETCc7ItI/uJ9BFJ+/3eZOUKzaRAG0HG4nsl1i5rVY=; b=G6QDURacaeKo6Rbso7wQnlZKKc0YCAI/32/l7UsxE2ADpEso9qzao2vd0yXFsS0xN8 O/21nWsU6VrIUfg9LOyJq/mbgJexYA5+SiLmTE8RLypY3Bl2QuuHHP+JH23P9f5JEZ8h dbf3J+ipx+sWNGn2+UQpRFHBdLS0p9GOl+b8ZowHMWIIjYkd+TRFhiayv4C9rMzAztt3 /q4+NpJ4YGYJQ8glqBhk2g8BQ/kXp2LnqRoY6YrXdUWCUM+78rErBWTneBe8Red1qKWK awQXzeulmh0YPXk1YHAZ97wfRdALOcXwS+klclF3jbeE27CUYZbQt0uWFCnXxt12vCPq ei9g== MIME-Version: 1.0 Received: by 10.68.200.231 with SMTP id jv7mr125895010pbc.140.1351809109671; Thu, 01 Nov 2012 15:31:49 -0700 (PDT) Received: by 10.66.88.195 with HTTP; Thu, 1 Nov 2012 15:31:49 -0700 (PDT) Date: Fri, 2 Nov 2012 02:31:49 +0400 Message-ID: Subject: Request for help: how do teach module building about kernel options? From: li cheng <2ohohoho@gmail.com> To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2012 22:31:51 -0000 Hi, I need a bit of a hand with this. I'd like to be able to make the wlan and ath modules aware of kernel configuration options. For example, a kernel configuration with IEEE80211_SUPPORT_TDMA won't build a wlan module that'll run successfully, as wlan/Makefile doesn't know to suck in ieee80211_tdma.c . I could just wrap the whole file up in an #ifdef, but I'd like to try and instead only build / link that object in if it's needed. Similarly, the ath module currently builds everything, regardless of what options are currently enabled in the kernel configuration file. So it'll always build ar5210, ar5211, ar5212, ar5416, ar9001, ar9002 support, along with ath_rate_sample. Instead, I'd like to be able to specify which HAL objects to link in, much like how you can do this with "device ath_rfX" for the RF backends and "device ath_arX" for the chipset support. For the integrated SoC stuff, it'd be nice to only build a HAL which supports the relevant hardware, rather than having to suck it _all_ in. So, what kinds of evil ways can people dream up to achieve this? :) --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD =ED=C9=C8=C1=C9=CC =F0=CF=C9=D3=CB =D4=CF=D7=C1=D2=CF=D7