diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2014-01-23 08:32:46 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:36 +0000 |
commit | 2fedfdca12983cf3240dd7b22ae53d7ee3b2b372 (patch) | |
tree | f3baa65f90107d1ea54c43408a75866e752b43d9 /scripts/runqemu-internal | |
parent | 96b24e7bd550cf8a3fc2fffa89349600d1a6280a (diff) | |
download | poky-2fedfdca12983cf3240dd7b22ae53d7ee3b2b372.tar.gz |
runqemu, runqemu-internal: Allow slirp for NFS and KVM use
The default slirp address for the NFS server is 10.0.2.2. If not
using a tap interface this address must be used or the target system
cannot connect properly. Also the ip=... kernel arguments need to be
set to dhcp when using slirp or the root NFS will not get setup
properly.
The call to cleanup() results in a routine which is not defined when
setting up the NFS because it is called before acquire() for the
locking of the tap interfaces, the solution being to simply not call
cleanup() that early.
When using slirp, kvm should not execute the vhost net checks because
the vhost net will not be configure or used.
(From OE-Core rev: 1ea04d87525f26c2cd32ba29c0f14c6226f60729)
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-x | scripts/runqemu-internal | 19 |
1 files changed, 11 insertions, 8 deletions
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 |