diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-10 10:28:09 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-10 10:45:55 +0100 |
commit | 8e43883f97f76857bd4cc85de544a09c6cceb24e (patch) | |
tree | c99c088548f785d2c0e65d164bd8e7d2960ff1c2 /scripts | |
parent | 3dd36ababd9acf0d5695b424cc145a482b6f3617 (diff) | |
download | poky-8e43883f97f76857bd4cc85de544a09c6cceb24e.tar.gz |
scrtips/poky-qemu: Fix network interface device numbering
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/poky-qemu-ifup | 2 | ||||
-rwxr-xr-x | scripts/poky-qemu-internal | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup index 68d8d37475..e248a27106 100755 --- a/scripts/poky-qemu-ifup +++ b/scripts/poky-qemu-ifup | |||
@@ -92,7 +92,7 @@ if [ "x$IFCONFIG" = "x" ]; then | |||
92 | IFCONFIG=/sbin/ifconfig | 92 | IFCONFIG=/sbin/ifconfig |
93 | fi | 93 | fi |
94 | 94 | ||
95 | n=$[ `echo $TAP | sed 's/tap//'` + 1 ] | 95 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] |
96 | $IFCONFIG $TAP 192.168.7.$n | 96 | $IFCONFIG $TAP 192.168.7.$n |
97 | 97 | ||
98 | # setup NAT for tap0 interface to have internet access in QEMU | 98 | # setup NAT for tap0 interface to have internet access in QEMU |
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 0cf4ced707..f1aa43945a 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
@@ -91,7 +91,10 @@ release_lock() { | |||
91 | fi | 91 | fi |
92 | } | 92 | } |
93 | 93 | ||
94 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" | 94 | n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] |
95 | n2=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] | ||
96 | |||
97 | KERNEL_NETWORK_CMD="ip=192.168.7.$n2::192.168.7.$n1:255.255.255.0" | ||
95 | QEMU_TAP_CMD="-net tap,vlan=0,ifname=$TAP,script=no,downscript=no" | 98 | QEMU_TAP_CMD="-net tap,vlan=0,ifname=$TAP,script=no,downscript=no" |
96 | QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD" | 99 | QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD" |
97 | KERNCMDLINE="mem=$QEMU_MEMORY" | 100 | KERNCMDLINE="mem=$QEMU_MEMORY" |