diff options
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 68d8d3747..e248a2710 100755 --- a/scripts/poky-qemu-ifup +++ b/scripts/poky-qemu-ifup @@ -92,7 +92,7 @@ if [ "x$IFCONFIG" = "x" ]; then IFCONFIG=/sbin/ifconfig fi -n=$[ `echo $TAP | sed 's/tap//'` + 1 ] +n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] $IFCONFIG $TAP 192.168.7.$n # setup NAT for tap0 interface to have internet access in QEMU diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 0cf4ced70..f1aa43945 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal @@ -91,7 +91,10 @@ release_lock() { fi } -KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" +n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] +n2=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] + +KERNEL_NETWORK_CMD="ip=192.168.7.$n2::192.168.7.$n1:255.255.255.0" QEMU_TAP_CMD="-net tap,vlan=0,ifname=$TAP,script=no,downscript=no" QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD" KERNCMDLINE="mem=$QEMU_MEMORY" |