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.

gadget storage device - unable to insmod

Guru 20755 points

Hello,

I have some difficulties using storage device with DM814x , 

This is the log on trying to insmod the device:

Applying sync command

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org dm814x ttyO0

Arago 2012.10 dm814x ttyO0

dm814x login: root
root@dm814x:~# mknod /dev/mmcblk0 b 179 0
root@dm814x:~# modprobe g_file_storage file=/dev/mmcblk0 stall=0 removable=1
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget-lun0: unable to open backing file: /dev/mmcblk0
FATAL: Error inserting g_file_storage (/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_file_storage.ko): No such device or address

.config file is attached,

3884.config.txt

Please advise,

Ran

  • Hi Ran,

    Have you connected MMC/SD card into the board ?

    Have you tried the RAM as storage ?

    Please refer to the following links.

    http://processors.wiki.ti.com/index.php/USB_OTG_on_DaVinci#Testing_USB_OTG_Functionality

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

  • Hi Titusrathinaraj,

    I am not using OTG (DM81x) does not support this feature.

    I also tried the RAM but I always get the "No such device" error when doing insmod:

    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# dd if=/dev/zero g.block bs=1M count=16

    16+0 records in
    16+0 records out

    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# modprobe g_file_ge file=/fsg.block stall=0
    FATAL: Error inserting g_file_storage (/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_file_storage.ko): No such device
    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# ls
    fsg.block g_file_storage.ko

    Regards,

    Ran

  • Hi Ran,

    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# modprobe g_file_ge file=/fsg.block stall=0
    FATAL: Error inserting g_file_storage (/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_file_storage.ko): No such device
    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# ls
    fsg.block g_file_storage.ko

    Have you checked the "g_file_storage.ko" file in the following location of your filesystem ?

    /lib/modules/2.6.37/kernel/drivers/usb/gadget/

    You can also insert the driver through "insmod" too.

    insmod "g_file_storage.ko


    Find out the location where you have g_file_storage.ko

  • Hi,

    Yes, the file exist there, but it still gives errors:

    root@dm814x:~# cd /lib/modules/2.6.37/kernel/drivers/usb/gadget
    root@dm814x:/lib/modules/2.6.37/kernel/drivers/usb/gadget# insmod g_file_storage.ko file=/fsg.block stall=0
    g_file_storage gadget: No serial-number string provided!
    g_file_storage gadget-lun0: unable to open backing file: /fsg.block
    insmod: error inserting 'g_file_storage.ko': -1 Unknown symbol in module

    Regards,

    Ran

  • I created the file in /home/root instead of /lib folder and now it seems better,

    g_file_storage gadget: No serial-number string provided!
    g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
    g_file_storage gadget: Number of LUNs=1
    g_file_storage gadget-lun0: ro=0, nofua=0, file: /home/root/fsg.block

    It seems as if it should work, but still I don't see any new driver in windows PC.

    Thanks,

    Ran

  • Hi,

    With EVM it works. Thank you very much,
    Ran