2009-10-22 08:15:43     How to workwith USB backing file?

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-10-22 08:15:43     How to workwith USB backing file?

Izhar Eyal (ISRAEL)

Message: 81596   

 

Hi,

 

I've being trying to work out the ezkit to be a USB gadget as a Mass Storage Device,

 

I enabled the backing file support + backing file testing app.

 

Here's what I get on the uclinux:

 

root:/> dd if=/dev/zero of=hd.dat bs=1M count=4

4+0 records in

4+0 records out

root:/> modprobe g_file_storage file=hd.dat stall=0

musb_hdrc: version 6.0, musb-dma, peripheral, debug=0

musb_hdrc: USB Peripheral mode controller at ffc03c00 using DMA, IRQ 82

g_file_storage gadget-lun0: unable to open backing file: hd.dat

modprobe: Failed to load module g_file_storage: unknown symbol in module, or un.

root:/>

 

 

What is the right way to do this?

 

Thanks:)

QuoteReplyEditDelete

 

 

2009-10-22 08:24:17     Re: How to workwith USB backing file?

Robin Getz (UNITED STATES)

Message: 81597   

 

Izhar:

 

Did you have a chance to look at:

 

https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:usb-gadget:file-backed_storage

 

-Robin

QuoteReplyEditDelete

 

 

2009-10-22 08:51:14     Re: How to workwith USB backing file?

Izhar Eyal (ISRAEL)

Message: 81599   

 

Hi Robin,

 

Yes, I did look at it and did exactly as said there. what else could be causing problems?

 

Thanks:)

QuoteReplyEditDelete

 

 

2009-10-22 08:56:10     Re: How to workwith USB backing file?

Mike Frysinger (UNITED STATES)

Message: 81600   

 

read `dmesg`.  "unknown symbol in module" usually means your kernel build is incomplete/wrong.

QuoteReplyEditDelete

 

 

2009-10-22 09:16:08     Re: How to workwith USB backing file?

Izhar Eyal (ISRAEL)

Message: 81601   

 

Hi Mike,

 

Please notice the problem is not with modprobe, but with g_file_storage...as can be seen both on the above before the "uknown symbol" message and in the dmesg,

 

both report as follows:

 

g_file_storage gadget-lun0: unable to open backing file hd.dat

 

 

 

Nothing else is reported.

 

Is there anything basic I'm missing which is not written in the Blackfin Docs? Do I need to format the file or do anything else to it?

 

Thanks

QuoteReplyEditDelete

 

 

2009-10-22 09:19:34     Re: How to workwith USB backing file?

Mike Frysinger (UNITED STATES)

Message: 81602   

 

give it a full path

QuoteReplyEditDelete

 

 

2009-10-22 10:27:43     Re: How to workwith USB backing file?

Izhar Eyal (ISRAEL)

Message: 81605   

 

Thanks Mike.

 

That worked:)

 

The Blackfin Docs section of "Use RAM based file as backing storage" is incorrect.

 

the full path: file=/hd.dat works.

 

The g_file_storage module is running.

 

 

 

Now still incomplete instructions, how do I run the line "g_file_storage gadget: full speed config #1"

 

There isn't any "g_file_storage" file created. connecting the USB connector to the PC nothing happens.

 

Am I missing something further?

QuoteReplyEditDelete

 

 

2009-10-22 11:07:57     Re: How to workwith USB backing file?

Michael Hennerich (GERMANY)

Message: 81606    >Now still incomplete instructions, how do I run the line

"g_file_storage gadget: full speed config

>#1"

 

This line is printed by the kernel module.

QuoteReplyEditDelete

 

 

2009-10-25 05:44:20     Re: How to workwith USB backing file?

Izhar Eyal (ISRAEL)

Message: 81682   

 

The backing file is working on a second card we have. the ez-kit was faulty.

 

Thanks everybody for all the help:)

Attachments

    Outcomes