summaryrefslogtreecommitdiffstats
path: root/scripts/poky-qemu-internal
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-xscripts/poky-qemu-internal15
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
53 53
54QEMUIFUP=`which poky-qemu-ifup` 54QEMUIFUP=`which poky-qemu-ifup`
55QEMUIFDOWN=`which poky-qemu-ifdown` 55QEMUIFDOWN=`which poky-qemu-ifdown`
56
57USER=`id -u`
58echo 'Setting up tap interface under sudo'
59TAP=`sudo $QEMUIFUP $USER`
60
56KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" 61KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0"
57QEMU_TAP_CMD="-net tap,vlan=0,ifname=tap0,script=$QEMUIFUP,downscript=$QEMUIFDOWN" 62QEMU_TAP_CMD="-net tap,vlan=0,ifname=$TAP,script=no,downscript=no"
58QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD" 63QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD"
59KERNCMDLINE="mem=$QEMU_MEMORY" 64KERNCMDLINE="mem=$QEMU_MEMORY"
60QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" 65QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
@@ -298,9 +303,13 @@ else
298 echo "Warning: distccd not present, no distcc support loaded." 303 echo "Warning: distccd not present, no distcc support loaded."
299fi 304fi
300 305
301echo "Running $QEMU using sudo..." 306
307
308echo "Running $QEMU..."
302echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" 309echo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE"
303sudo $QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true 310$QEMUBIN -kernel $ZIMAGE $QEMUOPTIONS $SERIALOPTS $* --append "$KERNCMDLINE" || /bin/true
311
312$QEMUIFDOWN $TAP
304 313
305trap - INT TERM QUIT 314trap - INT TERM QUIT
306return 315return