Patchwork [2/4] netbase: add iphone3g support

login
register
mail settings
Submitter Denis Carikli
Date Dec. 7, 2010, 2:32 p.m.
Message ID <1291732373-17953-3-git-send-email-GNUtoo@no-log.org>
Download mbox | patch
Permalink /patch/7/
State Accepted
Headers show

Comments

Denis Carikli - Dec. 7, 2010, 2:32 p.m.
Without that patch, the user can't ssh into his device,
  because usb0 is not up on the device side

Signed-off-by: Chris 'Lopi' Spehn <chris.spehn@gmail.com>
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 recipes/netbase/netbase/iphone3g/interfaces |   20 ++++++++++++++++++++
 recipes/netbase/netbase_4.21.bb             |    2 +-
 2 files changed, 21 insertions(+), 1 deletions(-)
 create mode 100644 recipes/netbase/netbase/iphone3g/interfaces
Stefan Schmidt - Dec. 9, 2010, 2:32 p.m.
Hello.

On Tue, 2010-12-07 at 15:32, Denis 'GNUtoo' Carikli wrote:
> Without that patch, the user can't ssh into his device,
>   because usb0 is not up on the device side
> 
> Signed-off-by: Chris 'Lopi' Spehn <chris.spehn@gmail.com>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>

Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

regards
Stefan Schmidt

Patch

diff --git a/recipes/netbase/netbase/iphone3g/interfaces b/recipes/netbase/netbase/iphone3g/interfaces
new file mode 100644
index 0000000..e0c5f21
--- /dev/null
+++ b/recipes/netbase/netbase/iphone3g/interfaces
@@ -0,0 +1,20 @@ 
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet/RNDIS gadget (g_ether)
+# ... or on host side, usbnet and random hwaddr
+auto usb0
+iface usb0 inet static
+	address 192.168.0.202
+	netmask 255.255.255.0
+	network 192.168.0.0
+	up route add default gw 192.168.0.200 metric 8
+	up echo nameserver 208.67.222.222 > /etc/resolv.conf
+	up echo nameserver 208.67.220.220 >> /etc/resolv.conf
+	down route del default gw 192.168.0.200 metric 8
+
+auto wlan0
+iface wlan0 inet dhcp
diff --git a/recipes/netbase/netbase_4.21.bb b/recipes/netbase/netbase_4.21.bb
index 68b8637..f3ae6e9 100644
--- a/recipes/netbase/netbase_4.21.bb
+++ b/recipes/netbase/netbase_4.21.bb
@@ -2,7 +2,7 @@  DESCRIPTION = "This package provides the necessary \
 infrastructure for basic TCP/IP based networking."
 SECTION = "base"
 LICENSE = "GPLv2"
-PR = "r49"
+PR = "r50"
 
 inherit update-rc.d