Kernel Configuration

On Embedded Platform
Insmod Drivers
After that, you will see a new ethernet adapter and a serial node named ‘/dev/ttyGS0’.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
# create mod.sh file and input followed command #/bin/sh insmod mii.ko insmod usbnet.ko insmod cdc_ether.ko insmod configfs.ko insmod libcomposite.ko insmod u_ether.ko insmod usb_f_ecm.ko insmod usb_f_rndis.ko insmod u_serial.ko insmod usb_f_acm.ko insmod g_cdc.ko # ./mod.sh usbcore: registered new interface driver cdc_ether using random self ethernet address using random host ethernet address usb0: HOST MAC 3e:e0:f8:43:d7:42 usb0: MAC 5a:b8:1d:9a:73:15 g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008 g_cdc gadget: g_cdc ready |
Connect Target to Host with a USB cable
You will see Windows notice found a new hardware and try to search and install driver.

On Host Platform
Because there is no associated device driver on Windows, so we use a virtual PC to validate it.
Connect it to Virtual PC

And you will see kernel print on virtual PC such as
|
[ 8324.071831] usb 1-2: new high-speed USB device number 8 using xhci_hcd [ 8324.427906] usb 1-2: New USB device found, idVendor=0525, idProduct=a4aa [ 8324.427913] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 8324.427917] usb 1-2: Product: CDC Composite Gadget [ 8324.427920] usb 1-2: Manufacturer: Linux 3.14.38+ with 2184000.usb [ 8324.489574] cdc_ether 1-2:1.0 usb0: register 'cdc_ether' at usb-0000:03:00.0-2, CDC Ethernet Device, de:60:bd:56:bd:c3 [ 8324.493219] cdc_acm 1-2:1.2: This device cannot do calls on its own. It is not a modem. [ 8324.493435] cdc_acm 1-2:1.2: ttyACM0: USB ACM device |
On embedded platform, kernel may print such as
|
g_cdc gadget: high-speed config #1: CDC Composite (ECM + ACM) |
Then you can test it.
Reference
- http://kaoru.tech/archives/1508
- http://kaoru.tech/archives/1509