summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index d5c00570ad..7fbe0a0976 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -260,13 +260,13 @@ case "$MACHINE" in
260 ;; 260 ;;
261esac 261esac
262 262
263if [ ! -f "$KERNEL" ]; then 263if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then
264 echo "Error: Kernel image file $KERNEL doesn't exist" 264 echo "Error: Kernel image file $KERNEL doesn't exist"
265 cleanup 265 cleanup
266 return 266 return
267fi 267fi
268 268
269if [ "$FSTYPE" != "nfs" -a ! -f "$ROOTFS" ]; then 269if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a ! -f "$ROOTFS" ]; then
270 echo "Error: Image file $ROOTFS doesn't exist" 270 echo "Error: Image file $ROOTFS doesn't exist"
271 cleanup 271 cleanup
272 return 272 return
@@ -342,6 +342,9 @@ if [ "$MACHINE" = "qemux86" ]; then
342 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 342 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
343 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" 343 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
344 fi 344 fi
345 if [ "$FSTYPE" = "vmdk" ]; then
346 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
347 fi
345 # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in 348 # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
346 # qemux86 and qemux86-64. We can use timer interrupt mode for now. 349 # qemux86 and qemux86-64. We can use timer interrupt mode for now.
347 KERNCMDLINE="$KERNCMDLINE oprofile.timer=1" 350 KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
@@ -366,6 +369,9 @@ if [ "$MACHINE" = "qemux86-64" ]; then
366 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 369 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
367 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" 370 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
368 fi 371 fi
372 if [ "$FSTYPE" = "vmdk" ]; then
373 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
374 fi
369 # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in 375 # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
370 # qemux86 and qemux86-64. We can use timer interrupt mode for now. 376 # qemux86 and qemux86-64. We can use timer interrupt mode for now.
371 KERNCMDLINE="$KERNCMDLINE oprofile.timer=1" 377 KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
@@ -561,8 +567,14 @@ fi
561 567
562echo "Running $QEMU..." 568echo "Running $QEMU..."
563# -no-reboot is a mandatory option - see bug #100 569# -no-reboot is a mandatory option - see bug #100
564echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' 570if [ "$FSTYPE" = "vmdk" ]; then
565LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" 571 echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
572 LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
573else
574 echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
575 LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
576fi
577
566 578
567 579
568cleanup 580cleanup