Difference between revisions of "Talk:USB Gadget"

From ArmadeusWiki
Jump to: navigation, search
(move installation)
 
 
Line 2: Line 2:
  
 
* configure your Linux kernel:
 
* configure your Linux kernel:
[armadeus]$ make linux26-menuconfig
+
<pre class="host">
in '''Device Drivers->USB support->USB Gadget Support''', choose '''Support for USB Gadgets''' and activate all USB Gadget Drivers:
+
$ make linux26-menuconfig
 
+
</pre>
 +
<pre class="config">
 +
Device Drivers --->
 +
    [*] USB support --->
 +
        <M>   USB Gadget Support --->
 +
</pre>
 +
* and activate all USB Gadget drivers you need:
 
[[Image:linux_config_usb_gadget.png]]
 
[[Image:linux_config_usb_gadget.png]]
  
 
* save your configuration and then rebuild your kernel image:
 
* save your configuration and then rebuild your kernel image:
  [armadeus]$ make
+
<pre class="host">
now you should have following drivers in your kernel source tree:
+
  $ make
  '''drivers/usb/gadget/gadgetfs.ko'''        For test
+
</pre>
  '''drivers/usb/gadget/g_ether.ko'''        Ethernet emulation on USB
+
now you should have the following drivers in your kernel source tree:
  '''drivers/usb/gadget/g_file_storage.ko'''  Mass storage
+
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/gadgetfs.ko'''        For test
  '''drivers/usb/gadget/g_serial.ko'''        Serial emulation on USB
+
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_ether.ko'''        Ethernet emulation on USB
  '''drivers/usb/gadget/g_zero.ko'''          For test
+
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_file_storage.ko'''  Mass storage
  '''drivers/usb/gadget/imx_udc.ko'''        i.MXL USB device Core Controller  
+
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_serial.ko'''        Serial emulation on USB
 +
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_zero.ko'''          For test
 +
  '''/lib/modules/`uname -r`/kernel/drivers/usb/gadget/imx_udc.ko'''        i.MXL USB device Core Controller  
  
 
* reflash your RootFS or manually copy ''imx_udc.ko, g_file_storage.ko & g_serial.ko'' to your target in /lib/modules/...
 
* reflash your RootFS or manually copy ''imx_udc.ko, g_file_storage.ko & g_serial.ko'' to your target in /lib/modules/...

Latest revision as of 10:37, 6 March 2012

Installation

  • configure your Linux kernel:
$ make linux26-menuconfig
Device Drivers  --->
    [*] USB support  --->
        <M>   USB Gadget Support  --->
  • and activate all USB Gadget drivers you need:

Linux config usb gadget.png

  • save your configuration and then rebuild your kernel image:
 $ make

now you should have the following drivers in your kernel source tree:

/lib/modules/`uname -r`/kernel/drivers/usb/gadget/gadgetfs.ko        For test
/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_ether.ko         Ethernet emulation on USB
/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_file_storage.ko  Mass storage
/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_serial.ko        Serial emulation on USB
/lib/modules/`uname -r`/kernel/drivers/usb/gadget/g_zero.ko          For test
/lib/modules/`uname -r`/kernel/drivers/usb/gadget/imx_udc.ko         i.MXL USB device Core Controller 
  • reflash your RootFS or manually copy imx_udc.ko, g_file_storage.ko & g_serial.ko to your target in /lib/modules/...

Usage

First, load the core controller driver on your board:

# modprobe imx_udc
 usb: imx_udc version: 0.5