On Tue, 18 Apr 2006, Peter Chen wrote:
>
> Hi,all
> I have developed my udc driver at 2.6.14 kernel.
> And I have two ko and need to insmod(dm320_udc.ko and
> g_file_storage.ko)
> In order to get convinence,i compile my code outside the kernel
> tree.(both udc and file_storage ko)
> the dm320_udc locates at /work/driver/usb/gadget.
> and the file_storage is at /work/driver/usb/file_storage
> In file_storage,i take the file_storage.c usbstringo.c config.c
> epautoconf.c from the kernel(2.6.14) tree
> and after i finish compiling and building the dm320_udc
> i go to compile and build the file_storage.ko
> I get below warning:
>
> CC [M] /work/driver/usb/file_storage/file_storage.o
> CC [M] /work/driver/usb/file_storage/usbstring.o
> CC [M] /work/driver/usb/file_storage/config.o
> CC [M] /work/driver/usb/file_storage/epautoconf.o
> LD [M] /work/driver/usb/file_storage/fsg.o
> Building modules, stage 2.
> MODPOST
> *** Warning:
> "usb_gadget_unregister_driver" [/work/driver/usb/file_storage/fsg.ko]
> undefined!
> *** Warning:
> "usb_gadget_register_driver" [/work/driver/usb/file_storage/fsg.ko]
> undefined!
Those warnings are normal. The builder is warning you that those entry
points are not defined in regular kernel source tree.
> CC /work/driver/usb/file_storage/fsg.mod.o
> LD [M] /work/driver/usb/file_storage/fsg.ko
>
> Besides:I have
> EXPORT_SYMBOL(usb_gadget_register_driver);
> EXPORT_SYMBOL(usb_gadget_unregister_driver);
> In my udc source file.
>
> Even i insmod dm320_udc after the kernel runs,the problem still exists
> (It doesn't any error when i insmod the dm320_udc.ko,and the probe is
> ok)
What do you mean "the problem still exists"? Do you mean that you still
get those warning messages when you run "make"? As I said, that's normal.
The only problem you should worry about is if you get an error when you do
"insmod fsg.ko".
> I guess that's because the usb_gadget_register_driver and
> usb_gadget_unregister_driver are not at kernel symbol table.
Right.
> Then,How can i add my function into the kernel symbol table
> when i compile and build source outside the kernel tree and
> build it as a module?
As far as I know, you can't. But I'm not an expert.
> Can u give me some tips about how to debug udc easily?
You should use the usbtest suite:
http://www.linux-usb.org/usbtest/
(Right now the server for that web page isn't working, but it should be
back up eventually.)
Alan Stern
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel