From: Chen Qi Date: Tue, 15 Jan 2013 02:17:01 +0000 (+0800) Subject: runqemu scripts: add support for booting an ISO image X-Git-Tag: rev_ivi_2015_02_04~14249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6e1a2a2c6faf79639fd3093e85e1c560b454a55;p=scm%2Fbb%2Ftizen-distro.git runqemu scripts: add support for booting an ISO image Add support for booting an ISO image for runqemu scripts. [YOCTO #3710] (From OE-Core rev: edd629029979dc18905fce23b64216f15eea501f) Signed-off-by: Chen Qi Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/scripts/runqemu b/scripts/runqemu index 188eccf..c20c8dd 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -27,6 +27,7 @@ usage() { echo " ROOTFS - the rootfs image file or nfsroot directory to use" echo " MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)" echo " RAMFS - boot a ramfs-based image" + echo " ISO - boot an ISO image" echo " VM - boot a vmdk image" echo " Simplified QEMU command-line options can be passed with:" echo " nographic - disables video console" @@ -40,6 +41,7 @@ usage() { echo " $MYNAME qemux86-64 core-image-sato ext3" echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" echo " $MYNAME qemux86 ramfs" + echo " $MYNAME qemux86 iso" echo " $MYNAME qemux86 qemuparams=\"-m 256\"" echo " $MYNAME qemux86 bootparams=\"psplash=false\"" echo " $MYNAME path/to/-.vmdk" @@ -132,6 +134,10 @@ while true; do FSTYPE=cpio.gz RAMFS=true ;; + "iso") + FSTYPE=iso + ISOFS=true + ;; "nographic") SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic" SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 9d570ed..0e3dad0 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal @@ -475,6 +475,10 @@ if [ "x$RAMFS" = "xtrue" ]; then KERNCMDLINE="root=/dev/ram0 debugshell" fi +if [ "x$ISOFS" = "xtrue" ]; then + QEMUOPTIONS="-cdrom $ROOTFS" +fi + if [ "x$QEMUOPTIONS" = "x" ]; then echo "Error: Unable to support this combination of options" cleanup @@ -577,6 +581,9 @@ echo "Running $QEMU..." if [ "$FSTYPE" = "vmdk" ]; then echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT +elif [ "$FSTYPE" = "iso" ]; then + echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT + LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT else echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"