summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2011-10-05 10:26:30 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-10 09:54:02 +0100
commit3b1346c607c41a2d592c48594457c32153cb2314 (patch)
tree5c15d2d971e63ac5e542ef1f0ff54600b6aff4fc /scripts
parentb0c111fd15be671be77ce886e28c05835f159ce6 (diff)
downloadopenembedded-core-3b1346c607c41a2d592c48594457c32153cb2314.tar.gz
openembedded-core-3b1346c607c41a2d592c48594457c32153cb2314.tar.bz2
openembedded-core-3b1346c607c41a2d592c48594457c32153cb2314.tar.xz
openembedded-core-3b1346c607c41a2d592c48594457c32153cb2314.zip
Allow user mode NFS server to run without rpcbind / portmap
and nfsroot mount without the need to talk to an RPC info server as long as the port numbers for mountd and nfsd are known in advance. This patch updates the qemu startup scripts and the user mode NFS server to have the ability to start without the need to use rpcbind or portmap services. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu-export-rootfs4
-rwxr-xr-xscripts/runqemu-internal16
2 files changed, 8 insertions, 12 deletions
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
index fec288acc..f8213ba4e 100755
--- a/scripts/runqemu-export-rootfs
+++ b/scripts/runqemu-export-rootfs
@@ -83,10 +83,12 @@ NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ]
NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
# NFS port number
NFS_PORT=$[ 3049 + $NFS_INSTANCE ]
+# mountd port number
+MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ]
## For debugging you would additionally add
## --debug all
-MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r"
+MOUNTD_OPTS="--allow-non-root --mount-pid $MOUNTPID -f $EXPORTS --rmtab $RMTAB --prog $NFS_MOUNTPROG -r -P $MOUNT_PORT"
NFSD_OPTS="--allow-non-root --nfs-pid $NFSPID -f $EXPORTS --prog $NFS_NFSPROG -P $NFS_PORT -r"
# Setup the exports file
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index ce3291f3a..2968ed939 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -258,21 +258,15 @@ fi
if [ "$FSTYPE" = "nfs" ]; then
NFS_SERVER="192.168.7.1"
NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
- MOUNTD_PORT=$[ 21111 + $NFS_INSTANCE ]
- NFSD_PORT=$[ 11111 + $NFS_INSTANCE ]
- UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_PORT,nfsprog=$NFSD_PORT,udp"
+ MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
+ NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ]
+ NFSD_PORT=$[ 3049 + $NFS_INSTANCE ]
+ MOUNTD_PORT=$[ 3048 + $NFS_INSTANCE ]
+ UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT"
PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo
export PSEUDO_LOCALSTATEDIR
- rpcbind_running=`ps ax | grep rpcbind | grep -v grep | wc -l`
- portmap_running=`ps ax | grep portmap | grep -v grep | wc -l`
- if [[ $rpcbind_running == 0 && $portmap_running == 0 ]]; then
- echo "You need to be running either rpcbind or portmap to continue"
- cleanup
- return
- fi
-
# Start the userspace NFS server
echo "runqemu-export-rootfs restart $ROOTFS"
runqemu-export-rootfs restart $ROOTFS