From owner-freebsd-usb@FreeBSD.ORG Wed Aug 27 21:44:55 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8251F106568A for ; Wed, 27 Aug 2008 21:44:55 +0000 (UTC) (envelope-from stone.creek.114@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 2EE4E8FC18 for ; Wed, 27 Aug 2008 21:44:54 +0000 (UTC) (envelope-from stone.creek.114@gmail.com) Received: by gxk10 with SMTP id 10so4560051gxk.19 for ; Wed, 27 Aug 2008 14:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=/HaPPlfErbFfMgNB8xyEXGc+UPP0nszWCINEFDQ/Xu4=; b=I/1+l10C8YNE5GC9DLnAfe5Qqu7aGNSQZiaZ6SFaalIn3vI3DCRfQ9qa8wbKC8FxRt R2JZ4rMkiUFOmhAgUokww2EP6F/L0JdpD4F93HjsXFHZZkvhTnKLBtYIssMdeOhzj8Hn 2GQ6Fjv6aMjRpz0cLBIo/9b7heeWAr7LPXCco= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=CKQ9D+v7WGxs9qyhYfywFpgNhJxjNhI7TOvMxrVJc89a1pU92gEqdIyg0sJBd6JTZ5 2GuypmMq0KsIAUVL7W4drb/a2j7dS0+MRJWQDyr6+xoldni+Vcdi7+GdT2QKvyslibpA F3+Rvfcp81sgxStkZkud0OJm6HU9QsL4vMPns= Received: by 10.151.145.21 with SMTP id x21mr785433ybn.233.1219871951775; Wed, 27 Aug 2008 14:19:11 -0700 (PDT) Received: by 10.151.78.4 with HTTP; Wed, 27 Aug 2008 14:19:11 -0700 (PDT) Message-ID: <42877e8a0808271419v5e68c79alae4c9dc080dbec02@mail.gmail.com> Date: Wed, 27 Aug 2008 14:19:11 -0700 From: "C Hwang" To: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: make error after add 'device zyd' into MYKERNEL X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2008 21:44:55 -0000 Hi There, My first post! I install a fresh 7.0 release a week ago. I get two wireless USB adapter from Frys'. One is Linksys WUSB54GC which is working beautifully( I love Linksys). The 2nd USB adapter is Trendnet TEW-424UB. I want to add this device into the kernel so I add a line in MYKERNEL(derive from /usr/src/sys/i386/conf/GENERIC, make work with GENERIC) device zyd #for Trendnet TEW-424U. I also add a line in /usr/src/sys/conf/files (make can find the device without complain) dev/usb/if_zyd optional zyd then do #make buildkernel KERNCONF=MYKERNEL The make process good all the way to if_rum.c but fail at if_zyd.c there is a long error list but it seems all related to the same thing so I will just list it what I think is enough. printout of the make: ====================================================== ....before this all good cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissin g-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions - nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -i nclude opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-f unction-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mn o-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/usb/if_rum.c cc -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-p rototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nos tdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -incl ude opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-func tion-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-s se -mno-sse2 -mno-sse3 -ffreestanding /usr/src/sys/dev/usb/if_zyd.c -o /usr/src/sys/dev/usb/if_z yd /usr/lib/crt1.o(.text+0x85): In function `_start': : undefined reference to `main' /var/tmp//ccwgxp7Y.o(.text+0xf7): In function `zyd_free_rx_list': /usr/src/sys/dev/usb/if_zyd.c:652: undefined reference to `usbd_free_xfer' /var/tmp//ccwgxp7Y.o(.text+0x129): In function `zyd_cmd': /usr/src/sys/dev/usb/if_zyd.c:760: undefined reference to `usbd_alloc_xfer' /var/tmp//ccwgxp7Y.o(.text+0x1e0):/usr/src/sys/dev/usb/if_zyd.c:776: undefined reference to `usbd_ setup_xfer' /var/tmp//ccwgxp7Y.o(.text+0x1eb):/usr/src/sys/dev/usb/if_zyd.c:778: undefined reference to `usbd_ transfer' ================================================== I notice that there is an -o /usr/src/sys/dev/usb/if_zyd for compiler option. I don't know why it will use different compiler option for this module. I can do make at /usr/src/sys/modules/zyd and generate if_zyd.ko. I can maually load it with kldload ./if_zyd.ko and see it with kldstat. It can not be seen by ifconfig zyd0. I have been spend about two day to mess around the if_zyd.c, /usr/src/sys/NOTES,GENERIC.hint, /usr/src/sys/modules/Makefile, /usr/src/sys/dev/usb/usbdevs None change the result of make error. Someone has experience on adding zyd into kernel with this make problem? I read some other post it seems that there are more work need to be done but I don't think it will make compile error like this. Thanks, Ching