Forum Discussion
usb build error! help me :)
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif today i setup uclinux1.2 again,and modified kconfig files. but when i build the kernel ,here were so much errors :
Error drivers/built-in.o * In function `usb_buffer_map': undefined reference to `dma_map_single Error drivers/built-in.o * In function `usb_buffer_unmap_sg': undefined reference to `dma_unmap_sg' Error drivers/built-in.o * In function `usb_buffer_unmap': undefined reference to `dma_unmap_single' Error drivers/built-in.o * In function `usb_hcd_giveback_urb': undefined reference to `dma_unmap_single' Error drivers/built-in.o * In function `usb_sg_init': undefined reference to `sg_dma_address' Error drivers/built-in.o * undefined reference to `dma_map_single' undefined reference to `dma_map_single' Error drivers/built-in.o * undefined reference to `dma_unmap_single' undefined reference to `dma_unmap_single' Error drivers/built-in.o * undefined reference to `sg_dma_address' undefined reference to `sg_dma_len' Warning implicit declaration of CC drivers/usb/core/hub.o[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/usb.c] Warning implicit declaration of function `dma_map_single'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/hcd.c] Warning implicit declaration of function `dma_map_single'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/usb.c] Warning implicit declaration of function `dma_unmap_sg'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/usb.c] Warning implicit declaration of function `dma_unmap_single'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/hcd.c] Warning implicit declaration of function `dma_unmap_single'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/usb.c] Warning implicit declaration of function `sg_dma_address'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/message.c] Warning implicit declaration of function `sg_dma_len'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/core/message.c] Warning implicit declaration of function `usb_put_bus'[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/hc_sl811.c]10 Replies
- Altera_Forum
Honored Contributor
i had tried the whole day,but....http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
- Altera_Forum
Honored Contributor
i changed <*>USB support to <M>USB support. so its ok.
i typed "mount -n nodev -t procfs /proc/bus/usb"in sdk shell. here was an error: mount : mount point /proc/bus/usb does not exist. and the folder /proc/bus was empty. why? - Altera_Forum
Honored Contributor
(1) This is not a supported driver, and it's known to not work in 2.6.9. You should stop trying to use it and use the sl811-hcd driver from 2.6.10 following the instructions provided in a previous thread.
(2) it doesn't do you any good to get around symbol not found errors by compiling something as a module, since the symbols will simply not be found once you try to load the module. (3) You can't mount the usb filesystem until the driver is in place to provide it. It must either be compiled in or if you load it as a module you have to actually load the module first (see# 2 since that won't work with this driver). So, in summary, if you want to do less work, switch to the sl811-hcd driver from 2.6.10 and follow the guidelines given to get it to work. If you want the fun of implementing the missing functions from dma-mapping.h and who knows what other kernel headers/files, go ahead, but when I asked around there was no indication that anyone ever got that working, though wentao was apparently close. Porting the sl811-hcd driver from 2.6.10 is pretty quick and faily easy if you follow the instructions I gave in a previous thread. - Altera_Forum
Honored Contributor
thank for your help http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
i copied sl811-hcd.c etc from 2.6.10 to my uclinux. and build the kernel.but there is sl811-hcd.o.d but not sl811-hcd.o in usb folder. why? and when i select<*>usb support ,here were so much error about dma. i use sl811hs in host mode,and donnot need to use DMA. how to cancel it ?? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif - Altera_Forum
Honored Contributor
When you copied over the driver, did you modify the Kconfig and Makefile so as to only build the new sl811-hcd driver? The old one will complain about the dma functions which aren't present, but if you don't try to compile the old one at all, no problems. :-)
As for building sl811-hcd.o.d, I have no idea. Try posting the relevant portion of your modified Kconfig and Makefile files. - Altera_Forum
Honored Contributor
yeah,i modefied the Kconfig and Makefile file in usb and usb/host.
and deleted hc_sl811.c hc_simple.c ... in host folder. when i build the kernel,here was some error about sl811-hcd.c. such as: Kind Status Priority Description Resource In Folder Location Error error: `__force' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 1154 Error error: `__le32' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 1322 Error error: `ep' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 448 Error error: `regs' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 456 Error error: `req' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 441 Error error: `sl811' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 455 Error error: `status' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 452 Error error: `usb_hcd_release' undeclared (first use in this function)[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 1751 Error error: (Each undeclared identifier is reported only once[/cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 441 ... did you modify sl811-hcd.c before build it??? - Altera_Forum
Honored Contributor
Yes, if you look over the thread where I gave the instructions, I pasted the modifications I made. However, they're not related to the problem that you're facing.
Did you copy over the drivers/usb/host/sl811.h file as well as include/linux/usb_sl811.h files? The errors that you're getting sound a bit like you forgot to include them. - Altera_Forum
Honored Contributor
i had been my hometown for few days.http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
i use altera cyclone board. and think here was some bug in software. i use quartusii 4.1 + uclinux1.2 + usb hcd(2.6.10), so i cannot build the kernel. hi,clansdown. do u use quartusii 4.2 + uclinux1.3?? can you email your usb hcd(3 files) to me???([email protected]). thank u !!! - Altera_Forum
Honored Contributor
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif Error [In file included from /cygdrive/d/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/usb/host/sl811-hcd.c] kernel_0504 line 67
who know what's this error mean??? - Altera_Forum
Honored Contributor
Yeah, I'm using quartus 4.2sp1 & uClinux 1.3 -- I don't know whether this will work in the earlier version; 2.6.5 may be too far away from 2.6.10. Didn't I post the relevant portion of the driver in the earlier discussion? If not I'll go find my copy again and post it.