Recently, customers asked to use the MTK 6572 chip via USB OTG add support wired network card, I checked all the hooks and hooks all the site, there is no relevant discussion, see the MTK to the data, including FAQs, only said to support the USB OTG keyboard and mouse and USB stick. What to do? I'm the only one who comes.
However, according to my understanding of the USB device mechanism, as long as we hang on the USB Ethernet driver, then the USB Ethernet when plugged in, should be able to automatically match to its device driver, so as long as we hang on the USB Ethernet driver, Then you should be able to work properly.
First, it's a review of how we add Ethernet support if it's a non-MTK platform, of course, by make Menuconfig to join the driver. MTK's own definition of the method, there is no time to study how it is configured, according to its own definition to configure.
./alps/mediatek/config/xxx_project/autoconfig/kconfig/project Adding configuration variables
Of course, we need to download the latest Ethernet driver
Nic with USB 2.0 to Ethernet control Chip ax88772b, Android 2.3 and 4.0 under the General network card driver does not support this chip, need to download the latest Linux under ax88772b drive from the Internet
Drive: http://www.asix.com.tw/cs/download.php?sub=driverdetail&PItemID=105
Let's go under/drivers/net/usb.
./alps/mediatek/config/xxx_project/autoconfig/kconfig/project Add the following variables
Config_usb_mtk_otg=y
Config_usb_mtk_hdrc_hcd=y
Config_usb_pegasus=y
Config_usb_usbnet=y
Config_usb_net_ax8817x=y
Config_usb_net_cdcether=y
Config_usb_net_cdc_ncm=y
Config_usb_net_cdc_subset=y
Config_usb_belkin=y
Config_usb_armlinux=y
Config_usb_net_zaurus=y
Then execute./mk-t n K, which will report the following error
Building * * *
scripts/kconfig/conf--silentoldconfig Kconfig
.. /mediatek/platform/mt6572/kernel/kconfig/drivers:263:warning:config symbol defined without type
Warning: (video_vivi && fb_vga16 && fb_s3 && fb_vt8623 && fb_ark && USB_SISUSBVGA _con && mtk_fb_support_assertion_layer) selects font_8x16 which has unmet direct dependencies (Has_iomem &&am P VT && (Framebuffer_console | | Sgi_newport_console | | Sti_console | | Usb_sisusbvga_con))
*
* Restart config ...
*
*
* USB Network Adapters
*
USB CATC netmate-based Ethernet Device Support (experimental) (USB_CATC) [n/m/y/?] N
USB KLSI kl5usb101-based Ethernet Device Support (usb_kaweth) [n/m/y/?] N
USB PEGASUS/PEGASUS-II based Ethernet device Support (usb_pegasus) [y/n/m/?] Y
USB RTL8150 based Ethernet device Support (experimental) (usb_rtl8150) [n/m/y/?] N
Multi-Purpose USB Networking Framework (usb_usbnet) [y/n/m/?] Y
ASIX ax88xxx Based USB 2.0 Ethernet Adapters (usb_net_ax8817x) [y/n/m/?] Y
CDC Ethernet Support (smart devices such as cable modems) (usb_net_cdcether) [y/?] Y
CDC EEM Support (Usb_net_cdc_eem) [n/m/y/?] (NEW) aborted!
Console Input/output is redirected. Run ' Make oldconfig ' to update configuration.
MAKE[5]: * * * [silentoldconfig] Error 1
MAKE[4]: * * * [silentoldconfig] Error 2
MAKE[3]: * * * No rule to do target ' include/config/auto.conf ', needed by ' include/config/kernel.release '. Stop.
MAKE[2]: * * * [Sub-make] Error 2
Checking Memory Usage done!
==> [OK] 2014/11/06 22:28:09
--------------------------------------------------------------------------------------------------------------- ----------------------------
This error surface, configuration consistency and completeness requirements, we must./alps/mediatek/config/xxx_project/autoconfig/kconfig/project Add config_usb_net_cdc_eem= Definition of Y.
Add and recompile after./mk-t N K, also reported the following error
scripts/kconfig/conf--silentoldconfig Kconfig
.. /mediatek/platform/mt6572/kernel/kconfig/drivers:263:warning:config symbol defined without type
Warning: (video_vivi && fb_vga16 && fb_s3 && fb_vt8623 && fb_ark && USB_SISUSBVGA _con && mtk_fb_support_assertion_layer) selects font_8x16 which has unmet direct dependencies (Has_iomem &&am P VT && (Framebuffer_console | | Sgi_newport_console | | Sti_console | | Usb_sisusbvga_con))
*
* Restart config ...
*
*
* USB Network Adapters
*
USB CATC netmate-based Ethernet Device Support (experimental) (USB_CATC) [n/m/y/?] N
USB KLSI kl5usb101-based Ethernet Device Support (usb_kaweth) [n/m/y/?] N
USB PEGASUS/PEGASUS-II based Ethernet device Support (usb_pegasus) [y/n/m/?] Y
USB RTL8150 based Ethernet device Support (experimental) (usb_rtl8150) [n/m/y/?] N
Multi-Purpose USB Networking Framework (usb_usbnet) [y/n/m/?] Y
ASIX ax88xxx Based USB 2.0 Ethernet Adapters (usb_net_ax8817x) [y/n/m/?] Y
CDC Ethernet Support (smart devices such as cable modems) (usb_net_cdcether) [y/?] Y
CDC EEM Support (Usb_net_cdc_eem) [y/n/m/?] Y
CDC NCM Support (USB_NET_CDC_NCM) [y/n/m/?] Y
Davicom DM9601 based USB 1.1 10/100 Ethernet Devices (usb_net_dm9601) [n/m/y/?] (NEW) aborted!
Console Input/output is redirected. Run ' Make oldconfig ' to update configuration.
MAKE[5]: * * * [silentoldconfig] Error 1
MAKE[4]: * * * [silentoldconfig] Error 2
MAKE[3]: * * * No rule to do target ' include/config/auto.conf ', needed by ' include/config/kernel.release '. Stop.
MAKE[2]: * * * [Sub-make] Error 2
Checking Memory Usage done!
This shows that we need to add config_usb_net_dm9601=y
Once in a while, finally, we add all of the following configuration variables, compiled and passed.
Config_usb_mtk_otg=y
Config_usb_mtk_hdrc_hcd=y
Config_usb_pegasus=y
Config_usb_usbnet=y
Config_usb_net_ax8817x=y
Config_usb_net_cdc_eem=y
Config_usb_net_cdc_ncm=y
Config_usb_net_smsc75xx=y
Config_usb_net_smsc95xx=y
Config_usb_net_gl620a=y
Config_usb_net_net1080=y
Config_usb_net_plusb=y
Config_usb_net_mcs7830=y
Config_usb_net_cdcether=y
Config_usb_net_cdc_ncm=y
Config_usb_net_dm9601=y
Config_usb_net_cdc_subset=y
Config_usb_belkin=y
Config_usb_armlinux=y
Config_usb_net_zaurus=y
Config_usb_net_rndis_host=y
Config_usb_ali_m5632=y
Config_usb_an2720=y
Config_usb_epson2888=y
Config_usb_kc2190=y
Config_usb_net_cx82310_eth=y
Config_usb_net_kalmia=y
Config_usb_net_qmi_wwan=y
Config_usb_net_int51x1=y
Config_usb_sierra_net=y
Config_usb_vl600=y
--------------------------------------------------------------------------------
Then, burn the ROM to the target machine.
Then use the USB debug cable to connect the network card, the problem, because I do not have a serial device, while the USB OTG was occupied, unable to use the ADB debugging, how to do?
I downloaded a HyperTerminal apk and can execute shell commands in the device's interface.
Then execute dmseg and look at the information inserted into the OTG NIC, and you can see that the NIC is properly found and matched to the driver.
Then, on the terminal, execute the
Netcfg eth0 DHCP
SetProp net.dns1 8.8.8.8
After execution, perform a ifconfig view, you can see eth0 is normal configuration, and assigned the IP address, to this, debugging end, the work is simple, is to modify the Init.rc start related services can be.
MTK 65XX Series add Ethernet RJ45 wired LAN support via USB OTG