From 5c8fad6544421e238da2ff33f5bbf1ed68fbc8be Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Sat, 25 Sep 2010 11:22:23 +0800 Subject: poky-qemu-internal: Add userspace nfs support for mips and ppc Add userspace nfs support for mips and ppc architecture. This fixes [BUGID #343] Signed-off-by: Dongxiao Xu --- scripts/poky-qemu-internal | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index c28568049..e7b7af393 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal @@ -238,6 +238,15 @@ if [ "$MACHINE" = "qemumips" ]; then KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS" fi + if [ "$TYPE" = "nfs" ]; then + if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then + echo "Error: NFS mount point $HDIMAGE doesn't exist" + release_lock + return + fi + KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" + QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS" + fi fi if [ "$MACHINE" = "qemuppc" ]; then @@ -250,6 +259,15 @@ if [ "$MACHINE" = "qemuppc" ]; then KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS" fi + if [ "$TYPE" = "nfs" ]; then + if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then + echo "Error: NFS mount point $HDIMAGE doesn't exist" + release_lock + return + fi + KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty0 nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" + QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -no-reboot $QEMU_UI_OPTIONS" + fi fi if [ "$MACHINE" = "akita" ]; then -- cgit v1.2.3