diff options
-rwxr-xr-x | scripts/runqemu | 10 | ||||
-rwxr-xr-x | scripts/runqemu-internal | 19 |
2 files changed, 17 insertions, 12 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index dcb2931cac..9272b6f2d5 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -279,10 +279,12 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then | |||
279 | exit 1; | 279 | exit 1; |
280 | fi | 280 | fi |
281 | if [ ! -w /dev/vhost-net -o ! -r /dev/vhost-net ]; then | 281 | if [ ! -w /dev/vhost-net -o ! -r /dev/vhost-net ]; then |
282 | echo "You have no rights on /dev/vhost-net." | 282 | if [ "$SLIRP_ENABLED" != "yes" ] ; then |
283 | echo "Please change the ownership of this file as described at:" | 283 | echo "You have no rights on /dev/vhost-net." |
284 | echo "$YOCTO_PARAVIRT_KVM_WIKI"; | 284 | echo "Please change the ownership of this file as described at:" |
285 | exit 1; | 285 | echo "$YOCTO_PARAVIRT_KVM_WIKI"; |
286 | exit 1; | ||
287 | fi | ||
286 | fi | 288 | fi |
287 | fi | 289 | fi |
288 | 290 | ||
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index cecb527dfc..e3b0729030 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
@@ -114,7 +114,7 @@ NFSRUNNING="false" | |||
114 | ORIG_STTY=$(stty -g) | 114 | ORIG_STTY=$(stty -g) |
115 | 115 | ||
116 | if [ "$SLIRP_ENABLED" = "yes" ]; then | 116 | if [ "$SLIRP_ENABLED" = "yes" ]; then |
117 | KERNEL_NETWORK_CMD="" | 117 | KERNEL_NETWORK_CMD="ip=dhcp" |
118 | QEMU_TAP_CMD="" | 118 | QEMU_TAP_CMD="" |
119 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" | 119 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" |
120 | if [ "$KVM_ACTIVE" = "yes" ]; then | 120 | if [ "$KVM_ACTIVE" = "yes" ]; then |
@@ -301,9 +301,18 @@ if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a ! -f "$ROOTFS" ]; then | |||
301 | return 1 | 301 | return 1 |
302 | fi | 302 | fi |
303 | 303 | ||
304 | if [ "$FSTYPE" = "nfs" ]; then | 304 | if [ "$NFS_SERVER" = "" ]; then |
305 | NFS_SERVER="192.168.7.1" | 305 | NFS_SERVER="192.168.7.1" |
306 | if [ "$SLIRP_ENABLED" = "yes" ]; then | ||
307 | NFS_SERVER="10.0.2.2" | ||
308 | fi | ||
309 | fi | ||
310 | |||
311 | if [ "$FSTYPE" = "nfs" ]; then | ||
306 | NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'` | 312 | NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'` |
313 | if [ "$NFS_INSTANCE" = "" ] ; then | ||
314 | NFS_INSTANCE=0 | ||
315 | fi | ||
307 | MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ] | 316 | MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ] |
308 | NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ] | 317 | NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ] |
309 | NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ] | 318 | NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ] |
@@ -317,17 +326,11 @@ if [ "$FSTYPE" = "nfs" ]; then | |||
317 | echo "runqemu-export-rootfs restart $ROOTFS" | 326 | echo "runqemu-export-rootfs restart $ROOTFS" |
318 | runqemu-export-rootfs restart $ROOTFS | 327 | runqemu-export-rootfs restart $ROOTFS |
319 | if [ $? != 0 ]; then | 328 | if [ $? != 0 ]; then |
320 | cleanup | ||
321 | return 1 | 329 | return 1 |
322 | fi | 330 | fi |
323 | NFSRUNNING="true" | 331 | NFSRUNNING="true" |
324 | fi | 332 | fi |
325 | 333 | ||
326 | if [ "$NFS_SERVER" = "" ]; then | ||
327 | NFS_SERVER="192.168.7.1" | ||
328 | NFS_DIR=$ROOTFS | ||
329 | fi | ||
330 | |||
331 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then | 334 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then |
332 | QEMU=qemu-system-arm | 335 | QEMU=qemu-system-arm |
333 | MACHINE_SUBTYPE=versatilepb | 336 | MACHINE_SUBTYPE=versatilepb |