From owner-freebsd-stable@FreeBSD.ORG Thu Nov 26 18:44:10 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B565106566B for ; Thu, 26 Nov 2009 18:44:10 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA07.emeryville.ca.mail.comcast.net (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64]) by mx1.freebsd.org (Postfix) with ESMTP id 8122A8FC19 for ; Thu, 26 Nov 2009 18:44:10 +0000 (UTC) Received: from OMTA06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by QMTA07.emeryville.ca.mail.comcast.net with comcast id 9uMl1d00316AWCUA7ukBxn; Thu, 26 Nov 2009 18:44:11 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by OMTA06.emeryville.ca.mail.comcast.net with comcast id 9ukA1d0023S48mS8SukAdP; Thu, 26 Nov 2009 18:44:10 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 206731E3035; Thu, 26 Nov 2009 10:44:09 -0800 (PST) Date: Thu, 26 Nov 2009 10:44:09 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Message-ID: <20091126184409.GA65045@icarus.home.lan> References: <200911261743.KAA14021@lariat.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911261743.KAA14021@lariat.net> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: 8.0 kernel fails to build if some USB drivers are trimmed out; error in /sys/conf/files X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 18:44:10 -0000 On Thu, Nov 26, 2009 at 10:43:13AM -0700, Brett Glass wrote: > I encountered a strange bug when I was "trimming" the GENERIC FreeBSD > RELEASE-8.0 kernel to omit drivers for hardware that would not be used on one > target platform. I removed all of the USB Ethernet drivers except for "udav" > (Davicom USB Ethernet) and tried to rebuild the kernel. The build stopped at > the point where the kernel was linked, reporting undefined references in the > file /sys/usb/net/if_udav.c to "uether_pause", "uether_ifdetach", > "uether_getmii", and other routines with similar names. I discovered that > these functions are defined in the file usb_ethernet.c, which is in the same > directory as if_udav.c. Missing symbols are almost always the sign of a missing "device" directive inside of the kernel configuration file. In this case, they're part of sys/dev/usb/net/usb_ethernet.[ch], which should be being built. You absolutely need to include the following devices in addition to "device udav": device ether device miibus I assume you did leave "device usb" and related pieces (meaning lines around that area) intact. Keeping it simple: can we see your kernel configuration file in its entirety? It isn't included in the PR, nor in this Email. > More experimentation seems to indicate that the GENERIC kernel builds by sheer > luck, due to an odd quirk in the "config" utility. I haven't used "config" since the early 3.x days. I'm certain "make buildkernel" and friends relies on it, but configuring a kernel + building a kernel is a lot simpler now. Read /usr/src/Makefile, starting with the line "For individuals wanting to upgrade their sources". The steps there are accurate. I don't think parenthesis are the core of the problem, given that there are many other devices in /sys/conf/files which utilise said method. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |