Talk:USB Gadget: Difference between revisions
From ArmadeusWiki
(move installation) |
No edit summary |
||
Line 2: | Line 2: | ||
* configure your Linux kernel: | * configure your Linux kernel: | ||
<pre class="host"> | |||
$ 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: | ||
<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:
- 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