USB GadgetEthernet Linuxsunxiorg

This allows ethernet emulation over USB, allowing for all sorts of nifty things like SSH and NFS in one go plus charging over the same wire, at higher speeds than most Wifi connections.

Kernel support
Mainline kernel (via configfs)
The configfs approach allows you to configure the device dynamically from user-space.Thereby, additional configuration needs to be done to bring up the gadget compared with precomposed configurations.

(Instructions below were tested on A20 with kernel 5.9.0.)

The RNDIS gadget with configfs requires a number of menuconfig options being enabled:

Device Drivers —> [*] USB support —> Inventra Highspeed Dual Role Controller (TI, ADI, AW, …) MUSB Mode Selection (Dual Role mode) —> *** Platform Glue Layer *** Allwinner (sunxi) *** MUSB DMA mode *** [*] Disable DMA (always use PIO) USB Physical Layer drivers —> NOP USB Transceiver Driver USB Gadget Support —> USB Gadget functions configurable through configfs [*] RNDIS