Date: Thu, 26 Nov 2009 10:44:09 -0800 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: freebsd-stable@freebsd.org Subject: Re: 8.0 kernel fails to build if some USB drivers are trimmed out; error in /sys/conf/files Message-ID: <20091126184409.GA65045@icarus.home.lan> In-Reply-To: <200911261743.KAA14021@lariat.net> References: <200911261743.KAA14021@lariat.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091126184409.GA65045>