summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-10-03 15:13:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-04 14:10:40 +0100
commit94eef772c283170d19ba92c8de0054cd093fc487 (patch)
treefd8002ad09b566ca6730688baf5233fcd1aa3f4d
parent16d6ec51f4b976c9b86a8b6bf6251089df2d2732 (diff)
downloadopenembedded-core-94eef772c283170d19ba92c8de0054cd093fc487.tar.gz
openembedded-core-94eef772c283170d19ba92c8de0054cd093fc487.tar.bz2
openembedded-core-94eef772c283170d19ba92c8de0054cd093fc487.zip
runqemu: allow multiple unfs instances to run simultaneously
A miscalculation in the way the port numbers of mountd and nfsd are created was causing conflicts when starting multiple instances of qemu using userspace nfs. Thanks to Rudolf Streif for proposing this fix! Fixes [YOCTO #1969] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu-export-rootfs4
-rwxr-xr-xscripts/runqemu-internal4
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
index 90edc8a216..bbdaf5ba0f 100755
--- a/scripts/runqemu-export-rootfs
+++ b/scripts/runqemu-export-rootfs
@@ -82,9 +82,9 @@ NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ]
# rpc.nfsd RPC port
NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
# NFS port number
-NFS_PORT=$[ 3049 + $NFS_INSTANCE ]
+NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
# mountd port number
-MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ]
+MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
## For debugging you would additionally add
## --debug all
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 0f07bad970..7ca00f8fa0 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -277,8 +277,8 @@ if [ "$FSTYPE" = "nfs" ]; then
NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ]
- NFSD_PORT=$[ 3049 + $NFS_INSTANCE ]
- MOUNTD_PORT=$[ 3048 + $NFS_INSTANCE ]
+ NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
+ MOUNTD_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT"
PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo