diff options
Diffstat (limited to 'scripts/poky-qemu-internal')
| -rwxr-xr-x | scripts/poky-qemu-internal | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 8ff3add511..acb6ff50ff 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
| @@ -92,6 +92,16 @@ if [ "$TYPE" != "nfs" -a ! -f "$HDIMAGE" ]; then | |||
| 92 | return | 92 | return |
| 93 | fi | 93 | fi |
| 94 | 94 | ||
| 95 | if [ "$TYPE" = "nfs" ]; then | ||
| 96 | NFS_SERVER=`echo $HDIMAGE | sed 's/^\([^:]*\):.*/\1/'` | ||
| 97 | NFS_DIR=`echo $HDIMAGE | sed 's/^[^:]*:\(.*\)/\1/'` | ||
| 98 | fi | ||
| 99 | |||
| 100 | if [ "$NFS_SERVER" = "" ]; then | ||
| 101 | NFS_SERVER="192.168.7.1" | ||
| 102 | NFS_DIR=$HDIMAGE | ||
| 103 | fi | ||
| 104 | |||
| 95 | if [ ! -f "$ZIMAGE" ]; then | 105 | if [ ! -f "$ZIMAGE" ]; then |
| 96 | echo "Error: Kernel image file $ZIMAGE doesn't exist" | 106 | echo "Error: Kernel image file $ZIMAGE doesn't exist" |
| 97 | return | 107 | return |
| @@ -107,14 +117,11 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm | |||
| 107 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS" | 117 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS" |
| 108 | fi | 118 | fi |
| 109 | if [ "$TYPE" = "nfs" ]; then | 119 | if [ "$TYPE" = "nfs" ]; then |
| 110 | if [ "x$HDIMAGE" = "x" ]; then | 120 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then |
| 111 | HDIMAGE=/srv/nfs/qemuarm | ||
| 112 | fi | ||
| 113 | if [ ! -d "$HDIMAGE" ]; then | ||
| 114 | echo "Error: NFS mount point $HDIMAGE doesn't exist" | 121 | echo "Error: NFS mount point $HDIMAGE doesn't exist" |
| 115 | return | 122 | return |
| 116 | fi | 123 | fi |
| 117 | KERNCMDLINE="root=/dev/nfs nfsroot=192.168.7.1:$HDIMAGE rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 124 | KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
| 118 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb --no-reboot $QEMU_UI_OPTIONS" | 125 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb --no-reboot $QEMU_UI_OPTIONS" |
| 119 | fi | 126 | fi |
| 120 | if [ "$MACHINE" = "qemuarmv6" ]; then | 127 | if [ "$MACHINE" = "qemuarmv6" ]; then |
| @@ -133,14 +140,11 @@ if [ "$MACHINE" = "qemux86" ]; then | |||
| 133 | QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $HDIMAGE $QEMU_UI_OPTIONS" | 140 | QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $HDIMAGE $QEMU_UI_OPTIONS" |
| 134 | fi | 141 | fi |
| 135 | if [ "$TYPE" = "nfs" ]; then | 142 | if [ "$TYPE" = "nfs" ]; then |
| 136 | if [ "x$HDIMAGE" = "x" ]; then | 143 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then |
| 137 | HDIMAGE=/srv/nfs/qemux86 | ||
| 138 | fi | ||
| 139 | if [ ! -d "$HDIMAGE" ]; then | ||
| 140 | echo "Error: NFS mount point $HDIMAGE doesn't exist." | 144 | echo "Error: NFS mount point $HDIMAGE doesn't exist." |
| 141 | return | 145 | return |
| 142 | fi | 146 | fi |
| 143 | KERNCMDLINE="root=/dev/nfs nfsroot=192.168.7.1:$HDIMAGE rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 147 | KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
| 144 | QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" | 148 | QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" |
| 145 | fi | 149 | fi |
| 146 | fi | 150 | fi |
