NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
UsbConfigDevCDC
About this page[edit]
This page describes the Linux kernel config options for usb CDC gadget on different kernel versions. Please refer the config option which matches with kernel version of release you are using.
Configuration[edit]
Linux v3.2[edit]
Start the Linux Kernel Configuration tool:
$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm menuconfig
Select Device Drivers from the main menu.
... ... Power management options ---> [ ] Networking support ---> Device Drivers ---> File systems ---> Kernel hacking ---> ... ...
Select USB support as shown here
... ... <*> Sound card support ---> [*] HID Devices ---> [*] USB support ---> <*> MMC/SD/SDIO card support ---> ... ...
Go to USB Gadget Support as shown here
... ... < > USB YUREX driver support <*> USB Gadget Support ---> *** OTG and related infrastructure *** < > GPIO based peripheral-only VBUS sensing 'transceiver' ... ...
Select Inventra HDRC USB Peripheral as shown here
... ... (2) Maximum VBUS Power usage (2-500 mA) (2) Number of storage pipeline buffers <*> USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ADI, ...)) ---> < > USB Gadget Drivers ... ...
Select Ethernet Gadget as shown here
... ... <*> USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ADI, ...)) ---> < > USB Gadget Drivers ... <M> Ethernet Gadget (with CDC Ethernet support) [ ] RNDIS support [ ] Ethernet Emulation Model (EEM) support ... ...
For CDC gadget "RNDIS support" is not selected
This is all required for adding USB CDC gadget support in kernel.
Testing[edit]
CDC gadget driver module can be inserted using $ insmod g_ether.ko
The CDC Gadget driver will create an Ethernet device by the name usb0. You need to assign an IP address to the device and bring up the device. The typical command for that would be:
$ ifconfig usb0 <IP_ADDR> netmask 255.255.255.0 up