Date: Wed, 27 Aug 2008 14:19:11 -0700 From: "C Hwang" <stone.creek.114@gmail.com> To: freebsd-usb@freebsd.org Subject: make error after add 'device zyd' into MYKERNEL Message-ID: <42877e8a0808271419v5e68c79alae4c9dc080dbec02@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42877e8a0808271419v5e68c79alae4c9dc080dbec02>