From owner-freebsd-questions@FreeBSD.ORG Tue Sep 11 08:17:53 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA1C1065689 for ; Tue, 11 Sep 2012 08:17:52 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 76D7D8FC1F for ; Tue, 11 Sep 2012 08:17:51 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id q8B8I63n086935; Tue, 11 Sep 2012 03:18:06 -0500 (CDT) Date: Tue, 11 Sep 2012 03:18:06 -0500 (CDT) From: Robert Bonomi Message-Id: <201209110818.q8B8I63n086935@mail.r-bonomi.com> To: amvandemore@gmail.com In-Reply-To: Cc: freebsd-questions@freebsd.org Subject: Re: trouble building 'ndis' device driver into stripped-down custom kernel. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 08:17:53 -0000 Adam Vande More wrote: > > On Mon, Sep 10, 2012 at 2:23 PM, Robert Bonomi > wrote: > > > > > Enviorment is FreeBSD 8.3, i386 > > > > I'm currently running a stipped-down custom kernal with all superfluous > > devices/options removed. > > > > I'm trying to add the 'ndis' device back in, but when I follow the > > directions on the ndis(4) manpage, and add: > > options NDISAPI device ndis and try to re-compile the kernel > > (config, cd, make depend, make), linking fails, with: > > if_ndis.o(.text+0x1104): In function 'ndis_detach': > > : undefined reference to 'ndis_free_amem' > > if_ndis.o(.text+0x1194): In function 'ndis_attach': > > : undefined reference to 'ndis_alloc_amem' > > > > Obviously, the config file is missing 'something' -- does anybody have > > any ideat _what_ that something is? > > > > > It seems you need > > device pccard > > and whatever that depends upon if anything. This was also pointed out to me privately by another respondant. Adding just 'device pccard' did solve the problem. I've filed a bug report on the code in question -- the _run-time_ check for a PCMCIA/Cardbus/PC-card device should be bracketed with a COMPILE-TIME check for pccard support in the kernel.