diff options
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-x | scripts/poky-qemu-internal | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 62c64727c0..8ff3add511 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal @@ -53,8 +53,13 @@ fi QEMUIFUP=`which poky-qemu-ifup` QEMUIFDOWN=`which poky-qemu-ifdown` + +USER=`id -u` +echo 'Setting up tap interface under sudo' +TAP=`sudo $QEMUIFUP $USER` + KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" -QEMU_TAP_CMD="-net tap,vlan=0,ifname=tap0,script=$QEMUIFUP,downscript=$QEMUIFDOWN" +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" QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" @@ -298,9 +303,13 @@ else echo "Warning: distccd not present, no distcc support loaded." fi -echo "Running $QEMU using sudo..." + + +echo "Running $QEMU..." echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" -sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true +$QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true + +$QEMUIFDOWN $TAP trap - INT TERM QUIT return |