Friday, June 4, 2010

Add ethernet on boot

To enable ethernet on boot, there are several things you need to setup.

0. At one point, someone from online said put "ip=dhcp" in the bootarg. That actually does not work very well. You have to remove that if you have it in your u-boot.

1. The kernel section should enable the ethernet driver.

The following setup are actually in init.rc file:

2. There should be a line to bring up eth0 on boot

==============
# Bring up the eth0 interface
ifup eth0
# Setup the DNS server configuration.
setprop net.dns1 134.129.111.111
==============

3. Start up the netcfg service

==============
service ethernet /system/bin/netcfg eth0 dhcp
user root
==============

4. If the network does not work, you might want to add the following code

==============
service dhcpcdusb0 /system/bin/dhcpcd -o domain_name_servers -B eth0
user root
==============

No comments:

Post a Comment