mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
Allow running of multiple QEMU nfs instances
These changes allow multiple instances of the userspace NFS server to run, when brought up by consecutive instances of the poky-qemu control script. This fixes [BUGID #393] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
8532405c1d
commit
e70c8981f2
+17
-12
@@ -50,8 +50,9 @@ if [ -z "$QEMU_MEMORY" ]; then
|
||||
|
||||
fi
|
||||
|
||||
# This flag file is created when poky-gen-tapdevs creates a bank of
|
||||
# tap devices, indicating that the user does not have sudo privs.
|
||||
# This file is created when poky-gen-tapdevs creates a bank of tap
|
||||
# devices, indicating that the user should not bring up new ones using
|
||||
# sudo.
|
||||
NOSUDO_FLAG="/etc/poky-nosudo"
|
||||
|
||||
QEMUIFUP=`which poky-qemu-ifup`
|
||||
@@ -113,18 +114,17 @@ else
|
||||
fi
|
||||
|
||||
release_lock() {
|
||||
if [ "$LOCKFILE" = "" ]; then
|
||||
if [ ! -e "$NOSUDO_FLAG" ]; then
|
||||
$QEMUIFDOWN $TAP $POKY_NATIVE_SYSROOT
|
||||
else
|
||||
echo "Releasing lockfile of preconfigured tap device '$TAP'"
|
||||
lockfile-remove $LOCKFILE
|
||||
fi
|
||||
echo "Releasing lockfile of preconfigured tap device '$TAP'"
|
||||
lockfile-remove $LOCKFILE
|
||||
|
||||
if [ "$NFSRUNNING" = "true" ]; then
|
||||
echo "Shutting down the userspace NFS server:"
|
||||
echo "poky-export-rootfs stop $ROOTFS"
|
||||
poky-export-rootfs stop $ROOTFS
|
||||
fi
|
||||
if [ "$NFSRUNNING" = "true" ]; then
|
||||
echo "Shutting down the userspace NFS server..."
|
||||
echo "poky-export-rootfs stop $ROOTFS"
|
||||
poky-export-rootfs stop $ROOTFS
|
||||
fi
|
||||
}
|
||||
|
||||
n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
|
||||
@@ -136,6 +136,9 @@ QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD"
|
||||
KERNCMDLINE="mem=$QEMU_MEMORY"
|
||||
QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
|
||||
|
||||
NFS_INSTANCE=`echo $TAP | sed 's/tap//'`
|
||||
export NFS_INSTANCE
|
||||
|
||||
SERIALOPTS=""
|
||||
if [ "x$SERIAL_LOGFILE" != "x" ]; then
|
||||
SERIALOPTS="-serial file:$SERIAL_LOGFILE"
|
||||
@@ -172,7 +175,9 @@ fi
|
||||
if [ "$FSTYPE" = "nfs" ]; then
|
||||
NFS_SERVER="192.168.7.1"
|
||||
NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
|
||||
UNFS_OPTS="nfsvers=2,mountprog=21111,nfsprog=11111,udp"
|
||||
MOUNTD_PORT=$[ 21111 + $NFS_INSTANCE ]
|
||||
NFSD_PORT=$[ 11111 + $NFS_INSTANCE ]
|
||||
UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_PORT,nfsprog=$NFSD_PORT,udp"
|
||||
|
||||
PSEUDO_LOCALSTATEDIR=~/.poky-sdk/pseudo
|
||||
export PSEUDO_LOCALSTATEDIR
|
||||
|
||||
Reference in New Issue
Block a user