From ab02ac9fd9dfcbc096636eb5ba357361c0689b31 Mon Sep 17 00:00:00 2001
From: Jeremy Chang jeremy@0xlab.org Date: Mon, 14 Feb 2011 11:19:08 +0800 Subject: [PATCH] Enable ethernet interface during booting
Try to enable network and get ip by dhcp in boot script
Signed-off-by: Jeremy Chang jeremy@0xlab.org --- init.omap3.sh | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/init.omap3.sh b/init.omap3.sh index 997ee03..c91705b 100755 --- a/init.omap3.sh +++ b/init.omap3.sh @@ -15,3 +15,7 @@ do ;; esac done < /proc/cpuinfo + +netcfg usb0 up +sleep 3 +netcfg usb0 dhcp
On Mon, Feb 14, 2011 at 12:09 PM, Jeremy Chang jeremy@0xlab.org wrote:
From ab02ac9fd9dfcbc096636eb5ba357361c0689b31 Mon Sep 17 00:00:00 2001 From: Jeremy Chang jeremy@0xlab.org Date: Mon, 14 Feb 2011 11:19:08 +0800 Subject: [PATCH] Enable ethernet interface during booting
Try to enable network and get ip by dhcp in boot script
Signed-off-by: Jeremy Chang jeremy@0xlab.org
init.omap3.sh | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/init.omap3.sh b/init.omap3.sh index 997ee03..c91705b 100755 --- a/init.omap3.sh +++ b/init.omap3.sh @@ -15,3 +15,7 @@ do ;; esac done < /proc/cpuinfo
+netcfg usb0 up +sleep 3 +netcfg usb0 dhcp
The sleep feels dirty. Whats the underlying root cause for this being required?
Also, is this something we can solve in a common fashion for all boards with ethernet?
Also, is netcfg smart enough to renew dhcp lease if i unplug/replug the wire etc.?
Hi, Alexander: You're right. sleep's not needed. Actually "netcfg usb0 dhcp" is enough for enabling the ethernet and dhcp the ip address. Let's see how we can do this after we create the common directory for all the boards. This patch is only for enabling the ethernet during booting Android. If the wire is replugged, dhcp can not be triggered again.
-Jeremy
The sleep feels dirty. Whats the underlying root cause for this being required?
Also, is this something we can solve in a common fashion for all boards with ethernet?
Also, is netcfg smart enough to renew dhcp lease if i unplug/replug the wire etc.?
--
- Alexander