Hi, On Tue, Dec 11, 2012 at 10:07:51AM +0800, victor wrote: > > > do I insmod the file storage gadget separately? The /dev/mmcblk0 refers > to > > SD card, right? I insmod the sd card driver already. > > > > > > # lsmod > > > kagen2_udc 7262 0 - Live 0xbf02f000 > > > ka2000_sdio 6643 0 - Live 0xbf005000 > > > ka2000_sdhc 5291 0 - Live 0xbf000000 > > > > Did you check that the /dev/mmcblk0 and /dev/mmcblk0p1 devices exist? > > > > Did you look in the dmesg log for other messages? > > > > Alan Stern > > > > Yes, the devices /dev/mmcblk0 and /dev/mmcblk0p1 exist. The /dev/mmcblk0 can > be mounted. The dmesg does not contain other messages. I am not sure the way > to use g_file_storage.ko with UDC. Please kindly help me. > > # ls /dev/mmc* > /dev/mmc0 /dev/mmc2 /dev/mmcblk0p1 > /dev/mmc1 /dev/mmcblk0 /dev/mmcblk0p2 > > # mount /dev/mmcblk0 /mnt > # ls /mnt/ > initramfs.gz > # umount /mnt > umounting 1 > umounting 0 > # insmod kagen2_udc.ko > # insmod g_file_storage.ko file=/dev/mmcblk0 > insmod: can't insert 'g_file_storage.ko': No such device are you registering your udc with the udc class ?? Are you initilizing udc->gadget.dev ? Look at other udc drivers to check if you're missing something. For example look at drivers/usb/dwc3/gadget.c::dwc3_gadget_init() to see how I register the gadget device and how I add the gadget to the list of UDCs. Also look at drivers/usb/dwc3/gadget.c::dwc3_gadget_start() to see how that should be implemented. -- balbi
Attachment:
signature.asc
Description: Digital signature