This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Storage gadget

 

I am trying to get the USB storage gadget working on the DM355.

I have enabled it in the kernel config:

*
* NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
*
*
* USB Gadget Support
*
Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
  Debugging information files (USB_GADGET_DEBUG_FILES) [Y/n/?] y
  USB Peripheral Controller
  > 1. Inventra (M)HDRC USB Peripheral (USB_GADGET_MUSB_HDRC)
  choice[1]: 1
  USB Gadget Drivers
    Gadget Zero (DEVELOPMENT) (USB_ZERO) [N/m/?] n
    Ethernet Gadget (USB_ETH) [N/m/?] n
    Gadget Filesystem (EXPERIMENTAL) (USB_GADGETFS) [M/n/?] m
    File-backed Storage Gadget (USB_FILE_STORAGE) [M/n/?] m
      File-backed Storage Gadget testing version (USB_FILE_STORAGE_TEST) [N/y/?] n
    Serial Gadget (USB_G_SERIAL) [N/m/?] n
*

I did a clean build.

This creates the module usb-storage.ko

But when I try to run this I see the following:

insmod usb-storage.ko file=/dev/mmcblk0p1
usb_storage: disagrees about version of symbol struct_module
insmod: error inserting 'usb-storage.ko': -1 Invalid module format

Any one know what is wrong?

Thanks

Brendan

 

  • Schoolboy error solved.

    Took me a while to realise that I have to do "make modules" to build the required loadable modules.

    And that the modules under filesys/lib/modules are of no use.

    So usb storage gadget works fine.

    Net problem, we need another serial port.

    All three ports on or hardware are tied to other modules.

    So it would be handy to have another port for diagnostics.

    I tried loading the serial gadget. 
    I found a note somewhere that said the serial gadget does not implement tty functionality.  Is that correct?

    Also is saw errors trying to load the serial gadget with the storage gadget loaded.

    So three questions:

    Can I use the serial gadget to implement a serial console?

    If I can, can I run this at the same time as the storage gadget?

    Same questions relate to the ethernet gadget.

    Thanks

    B

  • Brendan,

    Can you provide the LSP version of your kernel? Depending on the LSP version the serial gadget may/may not have been validated/supported.

    regards

    swami

  • Is this the information you mean?

    Booting image at 80700000 ...
       Image Name:   Linux-2.6.10_mvl401
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1508892 Bytes =  1.4 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK

  • That helps.  I think you are using LSP1.2 package.

    Have you updated the packaged with the latest patches from the ti update website ? if not can you do update and retry the failing scenario?

    regards

    swami

  • Hi Swami

    Could you point me in the direction of these updates please, can't seem to find them.

  • Another question regarding these modules:

    Work so far has been done on the actual EVM (DM355).

    I have just tried the same test on our board and I get the following error:

    insmod g_file_storage.ko file=/dev/mmcblk1
    g_file_storage: Unknown symbol usb_gadget_register_driver
    g_file_storage: Unknown symbol usb_gadget_unregister_driver
    insmod: cannot insert `g_file_storage.ko': Unknown symbol in module (-1): No such file or directory

    So I assume I have a library missing.

    modprobe doesnot seem to work on the target, or on the EVM so its hard to tell which libraries I am missing, if indeed it is a library issue.

    Can any one assist with this please?

    Thanks

    Brendan

  • Pl. register at the following site and follow the updates link for the updates.

    http://www.go-dsp.com/forms/dvevm/registration.htm

     

    It seems that you are missing "drivers/usb/musb/musb hdrc.ko" file.  Pl. insmod that file for your configuration to work.

     

    regards

    swami

  • The insmod issues is now solved, I had not loaded the correct kernel when testing.

    Getting the updates is proving a little difficult, I have a myTi account but cannot register my EVM, the site does not like the serial number I type in.
    I have emailed my local rep for assistance with this.

    Thanks for yor help Swami.