summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu1
-rwxr-xr-xscripts/runqemu-internal34
2 files changed, 19 insertions, 16 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index fc7d749944..04caa6d264 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -422,3 +422,4 @@ INTERNAL_SCRIPT=`which runqemu-internal`
422fi 422fi
423 423
424. $INTERNAL_SCRIPT 424. $INTERNAL_SCRIPT
425exit $?
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 7ca00f8fa0..dfdde05e24 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -184,7 +184,7 @@ if [ "$TAP" = "" ]; then
184 if [ $? -ne 0 ]; then 184 if [ $? -ne 0 ]; then
185 # Re-run standalone to see verbose errors 185 # Re-run standalone to see verbose errors
186 sudo $QEMUIFUP $USERID $GROUPID $OECORE_NATIVE_SYSROOT 186 sudo $QEMUIFUP $USERID $GROUPID $OECORE_NATIVE_SYSROOT
187 return 187 return 1
188 fi 188 fi
189 LOCKFILE="$LOCKDIR/$tap" 189 LOCKFILE="$LOCKDIR/$tap"
190 echo "Acquiring lockfile for $tap..." 190 echo "Acquiring lockfile for $tap..."
@@ -256,20 +256,20 @@ case "$MACHINE" in
256 "spitz") ;; 256 "spitz") ;;
257 *) 257 *)
258 echo "Error: Unsupported machine type $MACHINE" 258 echo "Error: Unsupported machine type $MACHINE"
259 return 259 return 1
260 ;; 260 ;;
261esac 261esac
262 262
263if [ ! -f "$KERNEL" ]; then 263if [ ! -f "$KERNEL" ]; 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 1
267fi 267fi
268 268
269if [ "$FSTYPE" != "nfs" -a ! -f "$ROOTFS" ]; then 269if [ "$FSTYPE" != "nfs" -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 1
273fi 273fi
274 274
275if [ "$FSTYPE" = "nfs" ]; then 275if [ "$FSTYPE" = "nfs" ]; then
@@ -289,7 +289,7 @@ if [ "$FSTYPE" = "nfs" ]; then
289 runqemu-export-rootfs restart $ROOTFS 289 runqemu-export-rootfs restart $ROOTFS
290 if [ $? != 0 ]; then 290 if [ $? != 0 ]; then
291 cleanup 291 cleanup
292 return 292 return 1
293 fi 293 fi
294 NFSRUNNING="true" 294 NFSRUNNING="true"
295fi 295fi
@@ -312,7 +312,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
312 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then 312 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
313 echo "Error: NFS mount point $ROOTFS doesn't exist" 313 echo "Error: NFS mount point $ROOTFS doesn't exist"
314 cleanup 314 cleanup
315 return 315 return 1
316 fi 316 fi
317 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 317 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
318 QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb --no-reboot $QEMU_UI_OPTIONS" 318 QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb --no-reboot $QEMU_UI_OPTIONS"
@@ -336,7 +336,7 @@ if [ "$MACHINE" = "qemux86" ]; then
336 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then 336 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
337 echo "Error: NFS mount point $ROOTFS doesn't exist." 337 echo "Error: NFS mount point $ROOTFS doesn't exist."
338 cleanup 338 cleanup
339 return 339 return 1
340 fi 340 fi
341 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 341 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
342 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" 342 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
@@ -360,7 +360,7 @@ if [ "$MACHINE" = "qemux86-64" ]; then
360 if [ ! -d "$ROOTFS" ]; then 360 if [ ! -d "$ROOTFS" ]; then
361 echo "Error: NFS mount point $ROOTFS doesn't exist." 361 echo "Error: NFS mount point $ROOTFS doesn't exist."
362 cleanup 362 cleanup
363 return 363 return 1
364 fi 364 fi
365 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 365 KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
366 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" 366 QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
@@ -401,7 +401,7 @@ if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemum
401 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then 401 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
402 echo "Error: NFS mount point $ROOTFS doesn't exist" 402 echo "Error: NFS mount point $ROOTFS doesn't exist"
403 cleanup 403 cleanup
404 return 404 return 1
405 fi 405 fi
406 KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 406 KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
407 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS" 407 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
@@ -422,7 +422,7 @@ if [ "$MACHINE" = "qemuppc" ]; then
422 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then 422 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
423 echo "Error: NFS mount point $ROOTFS doesn't exist" 423 echo "Error: NFS mount point $ROOTFS doesn't exist"
424 cleanup 424 cleanup
425 return 425 return 1
426 fi 426 fi
427 KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 427 KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
428 QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS" 428 QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
@@ -442,7 +442,7 @@ if [ "$MACHINE" = "qemush4" ]; then
442 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then 442 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
443 echo "Error: NFS mount point $ROOTFS doesn't exist" 443 echo "Error: NFS mount point $ROOTFS doesn't exist"
444 cleanup 444 cleanup
445 return 445 return 1
446 fi 446 fi
447 KERNCMDLINE="root=/dev/nfs console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" 447 KERNCMDLINE="root=/dev/nfs console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
448 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio" 448 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
@@ -469,7 +469,7 @@ fi
469if [ "x$QEMUOPTIONS" = "x" ]; then 469if [ "x$QEMUOPTIONS" = "x" ]; then
470 echo "Error: Unable to support this combination of options" 470 echo "Error: Unable to support this combination of options"
471 cleanup 471 cleanup
472 return 472 return 1
473fi 473fi
474 474
475if [ "x$CROSSPATH" = "x" ]; then 475if [ "x$CROSSPATH" = "x" ]; then
@@ -482,7 +482,7 @@ QEMUBIN=`which $QEMU 2> /dev/null`
482if [ ! -x "$QEMUBIN" ]; then 482if [ ! -x "$QEMUBIN" ]; then
483 echo "Error: No QEMU binary '$QEMU' could be found." 483 echo "Error: No QEMU binary '$QEMU' could be found."
484 cleanup 484 cleanup
485 return 485 return 1
486fi 486fi
487 487
488NEED_GL=`ldd $QEMUBIN/$QEMU 2>&1 | grep libGLU` 488NEED_GL=`ldd $QEMUBIN/$QEMU 2>&1 | grep libGLU`
@@ -498,7 +498,7 @@ if [ "$NEED_GL" != "" ]; then
498 echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator. 498 echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.
499 Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev. 499 Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.
500 Fedora package names are: mesa-libGL-devel mesa-libGLU-devel." 500 Fedora package names are: mesa-libGL-devel mesa-libGLU-devel."
501 exit 1; 501 return 1;
502 fi 502 fi
503fi 503fi
504 504
@@ -508,7 +508,7 @@ do_quit() {
508 kill `cat $PIDFILE` 508 kill `cat $PIDFILE`
509 fi 509 fi
510 cleanup 510 cleanup
511 return 511 return 1
512} 512}
513 513
514DISTCCD=`which distccd 2> /dev/null` 514DISTCCD=`which distccd 2> /dev/null`
@@ -562,8 +562,10 @@ echo "Running $QEMU..."
562# -no-reboot is a mandatory option - see bug #100 562# -no-reboot is a mandatory option - see bug #100
563echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' 563echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
564LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" 564LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
565 565ret=$?
566 566
567cleanup 567cleanup
568 568
569trap - INT TERM QUIT 569trap - INT TERM QUIT
570
571return $ret