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.

AM3517 USB-OTG, RNDIS Gadget Driver, g_ether.ko

Other Parts Discussed in Thread: AM3517

Dear All,

I need to connect to LINUX and WINDOWS using USB-OTG.

For that I had build module g_ether.ko in 2.6.37 kernel. configured kernel according to usb driver user guide

REF:http://processors.wiki.ti.com/index.php/UserGuideUsbDriver_PSP_04_02_00_07#CDC.2FRNDIS_gadget

when i try to insert g_ether.ko module by insmod following is the error message..,

root@devkit:~# insmod /lib/modules/2.6.37/g_ether.ko
insmod: can't insert '/lib/modules/2.6.37/g_ether.ko': No such device

When i tried to modprobe following is the error..,

root@devkit:~# modprobe /lib/modules/2.6.37/g_ether.ko
modprobe: module /lib/modules/2.6.37/g_ether.ko not found in modules.dep

Are there any more changes i should configure in kernel or in file system.

Thanks in  Advance,

Chinna.

  • Chinna,

    Is the /lib/modules/2.6.37/g_ether.ko file actually in that directory?  That is not a normal location for driver modules.  Usually it is something like /lib/modules/2.6.37/kernel/drivers/usb/......

    Also if you want to use modprobe then you should have run depmod and also only do modprobe g_ether and not give the whole path.

    Chase

  • Dear Chase,

    Yes, its in the  same directory, As you said the path in with k_gether.ko copied is not correct but in my file system the path is not present at all i am bit confused by that. Actually path ends as follows..

    root@devkit:~# ls /lib/modules/2.6.37/
    g_ether.ko           modules.devname      modules.seriomap
    modules.alias        modules.ieee1394map  modules.softdep
    modules.alias.bin    modules.inputmap     modules.symbols
    modules.ccwmap       modules.isapnpmap    modules.symbols.bin
    modules.dep          modules.ofmap        modules.usbmap
    modules.dep.bin      modules.pcimap

     root@devkit:~#

    Is there any more setting in while compiling kernel i had selected module loading and unloading in make menuconfig. should i compile filesystem also. Any more suggesions.

    Thank you,

    Chase.

  • Rajeev,

    Which version of the Sitara Linux SDK are you using?

    Chase

  • You can try to run command "depmod -a" on the target.

    maybe this topic can give you some help - http://e2e.ti.com/support/embedded/linux/f/354/p/185255/668845.aspx#668845

  • Chase,


    I am using 2.6.37 kernel and PSP 04.02.00.07 version.

    I had made necessary changes in .config like compiling kernel with usb as modul.


    Following are the commands used for bulding kernel and modules and installing into SDCARD
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
    #make ARCH=arm modules_install INSTALL_MOD_PATH=/media/46fe61eb-d3ea-4813-9e18-45bf7cd72a18/

      INSTALL drivers/net/wireless/libertas/libertas_sdio.ko
      INSTALL drivers/scsi/scsi_wait_scan.ko
      INSTALL drivers/staging/omap3-sgx/pvrsrvkm.ko
      INSTALL drivers/staging/omap3-sgx/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko
      INSTALL drivers/staging/omap3-sgx/services4/3rdparty/dc_omap3430_linux/omaplfb.ko
      INSTALL drivers/usb/gadget/g_ether.ko
      DEPMOD  2.6.37

    SDCARD is in /media/46xx path, by the above command i am able to generate modules in kernel/driver/


    Rajeev

    root@devkit:~# ls -ltr  /lib/modules/2.6.37/kernel/drivers/
    drwxr-xr-x    3 root     root          1024 Jun  6 05:00 usb
    drwxr-xr-x    3 root     root          1024 Jun  6 05:00 staging
    drwxr-xr-x    2 root     root          1024 Jun  6 05:00 scsi
    drwxr-xr-x    3 root     root          1024 Jun  6 05:00 net

    I am still facing same problem.

    root@devkit:~# insmod  /lib/modules/2.6.37/kernel/drivers/usb/gadget/g_ether.ko
    insmod: can't insert '/lib/modules/2.6.37/kernel/drivers/usb/gadget/g_ether.ko': No such device

  • James,

    Yes i did depmod -a and also depmod.26 -a nothing is getting executed

    Rajeev

  • Chase,

    I am able to insert the scsi_wait_scan.ko module successfully

    root@devkit:/lib/modules/2.6.37# insmod kernel/drivers/scsi/scsi_wait_scan.ko

    root@devkit:/lib/modules/2.6.37# ls -ltr
    lrwxrwxrwx    1 root     root            49 Jun  6 05:00 source -> /data/xukr-20120103-omap3.bkp/linux-2.6.37-tn.bkp
    -rw-r--r--    1 root     root           340 Jun  6 05:00 modules.order
    -rw-r--r--    1 root     root          5906 Jun  6 05:00 modules.builtin
    drwxr-xr-x    3 root     root          1024 Jun  6 05:00 kernel
    lrwxrwxrwx    1 root     root            49 Jun  6 05:00 build -> /data/xukr-20120103-omap3.bkp/linux-2.6.37-tn.bkp
    -rw-r--r--    1 root     root           189 Jun  6 12:05 modules.usbmap
    -rw-r--r--    1 root     root           114 Jun  6 12:05 modules.symbols.bin
    -rw-r--r--    1 root     root           142 Jun  6 12:05 modules.symbols
    -rw-r--r--    1 root     root           131 Jun  6 12:05 modules.softdep
    -rw-r--r--    1 root     root            43 Jun  6 12:05 modules.seriomap
    -rw-r--r--    1 root     root            99 Jun  6 12:05 modules.pcimap
    -rw-r--r--    1 root     root            74 Jun  6 12:05 modules.ofmap
    -rw-r--r--    1 root     root            81 Jun  6 12:05 modules.isapnpmap
    -rw-r--r--    1 root     root           141 Jun  6 12:05 modules.inputmap
    -rw-r--r--    1 root     root            73 Jun  6 12:05 modules.ieee1394map
    -rw-r--r--    1 root     root            52 Jun  6 12:05 modules.devname
    -rw-r--r--    1 root     root           633 Jun  6 12:05 modules.dep.bin
    -rw-r--r--    1 root     root           436 Jun  6 12:05 modules.dep
    -rw-r--r--    1 root     root            69 Jun  6 12:05 modules.ccwmap
    -rw-r--r--    1 root     root          6919 Jun  6 12:05 modules.builtin.bin
    -rw-r--r--    1 root     root            92 Jun  6 12:05 modules.alias.bin
    -rw-r--r--    1 root     root           123 Jun  6 12:05 modules.alias

    As you can see following is change in all .dep .order files i checked with them .dep file g_ether.ko is present

    root@devkit:/lib/modules/2.6.37# cat modules.dep
    kernel/drivers/scsi/scsi_wait_scan.ko:
    kernel/drivers/net/wireless/libertas/libertas_sdio.ko:
    kernel/drivers/usb/gadget/g_ether.ko:
    kernel/drivers/staging/omap3-sgx/services4/3rdparty/dc_omap3430_linux/omaplfb.ko: kernel/drivers/staging/omap3-sgx/pvrsrvkm.ko
    kernel/drivers/staging/omap3-sgx/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko: kernel/drivers/staging/omap3-sgx/pvrsrvkm.ko
    kernel/drivers/staging/omap3-sgx/pvrsrvkm.ko:

    if i modprobe following is the error, it says g_ether.ko as no such device

    root@devkit:/lib/modules/2.6.37# modprobe g_ether.ko
    modprobe: can't load module g_ether.ko (kernel/drivers/usb/gadget/g_ether.ko): No such device
    root@devkit:/lib/modules/2.6.37# ls kernel/drivers/usb/gadget/g_ether.ko
    kernel/drivers/usb/gadget/g_ether.ko
    root@devkit:/lib/modules/2.6.37#

  • Can you do an lsmod command and look if you already have a gadget driver loaded. You can only have one gadget driver loaded and you can get that error message if you try loading a second.

    Steve K.

  • Steve

     I had tested lsmod  also. Here are the list of modules, which are already inserted. but not g_ether.ko.

    root@devkit:/# lsmod
    Module                  Size  Used by    Tainted: G  
    bufferclass_ti          4883  0
    omaplfb                 8134  0
    pvrsrvkm              153648  2 bufferclass_ti,omaplfb
    libertas_sdio         134532  0

    Any more suggestions.

    Rajeev

  • Hi All,

    USB DEVICE problem solved. i configured kernel according to PSP user guide  "http://processors.wiki.ti.com/index.php/UserGuideUsbDriver_PSP_04_02_00_07"

    with only one change as said in user guide. selected am33X instead of omap2430 onwards.  That is as follows...

       <*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
               **** Platform Glue Layer ***
        <>     TUSB6010
        <>     OMAP2430 and onwards
        <*>     AM35x  
               Driver Mode (USB Peripheral (gadget stack)) --->
        [ ] Disable DMA (always use PIO)
        [*] Use System DMA for Mentor DMA workaround
        [*] Enable debugging messages

    Everything else is same as given in PSP USER GUIDE

    Regards,

    Rajeev.

  • Rajeev, Can you share some sample how to communicate and transfer data between linux and windows through USB 

  • Hello GR BSRS,

      1) You should configure  USB In LINUX unit as GADGET. This should be done in Kernel.

       2) In linux you should assign a IP for USB0 by /sbin/ifconfig usb0 223.0.0.10 up.

      3) And then when you connect LINUX unit to Windows PC ( using USB to MiniAB cable)

      4) It will prompt for a driver. you should download RNDIS gadget Driver for windows from Internet and include the path.

      5) Go to network setting in windows there you can see a network established with limited connection ,

         Open properties and set IP as 223.0.0.5 then a connection will be established.

      6) Then you can connect to Linux unit using PUTTY or WINSCP.

    Have you need any more help  i am ready.. This time i will get back to early

    Regards,

    Rajeev

  • Hi 

    I tried to menuconfig and i could not find option for 

    <*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
               **** Platform Glue Layer ***
     <>     TUSB6010
     <*>     OMAP2430 and onwards
     <>     AM35x  
    as mentioned in http://processors.wiki.ti.com/index.php/UserGuideUsbDriver_PSP_04_02_00_07#MUSB_OTG_controller_in_gadget_mode
  • hi is it possible for you to send me copy of g_ether.ko file BSRS

  • Hello BSRS,

    From the link posted by you you are compiling Kernel for AM3517,

    For that change the settings as follows

     <*> Inventra Highspeed Dual Role Controller (TI, ADI, ...) **** Platform Glue Layer ***
     <> TUSB6010 <> OMAP2430 and onwards
     <*> AM35x Driver Mode (USB Peripheral (gadget stack)) --->
     [ ] Disable DMA (always use PIO)
     [*] Use System DMA for Mentor DMA workaround 
     [*] Enable debugging messages

    And also change menuconfig as follows

     <*>   USB Gadget Support  --->                                                                              
         *** OTG and related infrastructure ***                                                                  
       < >   GPIO based peripheral-only VBUS sensing 'transceiver'                                                  
        [ ]   Generic ULPI Transceiver Driver                                                                           
       <*>   NOP USB Transceiver Driver   


     <*>   USB Gadget Support  --->   

                                        <M>   USB Gadget Drivers                                                                                         
                                                < >     Gadget Zero (DEVELOPMENT)                                         
                                               < >     Audio Gadget (EXPERIMENTAL)                     
                                               <M>     Ethernet Gadget (with CDC Ethernet support) 
                                               [*]       RNDIS support              

    And then compile with command  #make modules and also copy the modules into SDCARD

    #sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/mnt/sdcard
         <assuming his SD card is mounted in this path /mnt/sdcard>

    Find attachment for modules.txt & .config (AM3517config.txt) files


    Regards,

    4188.modules.txt1665.AM3517config.txtRajeev

                  

  • Hello BSRS,

    Find the attachment for g_ether.ko for AM3517. As bin files are not uploading, made a tar file and attached so Extraxt the file to get g_ether.ko

    In Kernel select    module loading support

                                  

  • Rajeev 

    It did not work, i gave all the information at http://e2e.ti.com/support/embedded/linux/f/354/t/234172.aspx stated a new thread.

    BSRS