From patchwork Sat Aug 11 03:20:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] runqemu: support booting poky-tiny images Date: Sat, 11 Aug 2012 03:20:38 -0000 From: Scott Garman X-Patchwork-Id: 34293 Message-Id: <081e2a4154575d494f0f56f1b5e4ff70b93ca8e2.1344655148.git.scott.a.garman@intel.com> To: openembedded-core@lists.openembedded.org Added support for booting poky-tiny images, which do not have block device support. Note to shut down a running poky-tiny image, you need to include the -f option to the poweroff command. This fixes [YOCTO #2612]. Signed-off-by: Scott Garman --- scripts/runqemu | 6 ++++++ scripts/runqemu-internal | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index 7454dd4..6f2f861 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -26,6 +26,7 @@ usage() { echo " KERNEL - the kernel image file to use" echo " ROOTFS - the rootfs image file or nfsroot directory to use" echo " MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)" + echo " TINY - specify 'tiny' if booting a poky-tiny image" echo " Simplified QEMU command-line options can be passed with:" echo " nographic - disables video console" echo " serial - enables a serial console on /dev/ttyS0" @@ -37,6 +38,7 @@ usage() { echo " $MYNAME qemuarm" echo " $MYNAME qemux86-64 core-image-sato ext3" echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" + echo " $MYNAME qemux86 tiny" echo " $MYNAME qemux86 qemuparams=\"-m 256\"" echo " $MYNAME qemux86 bootparams=\"psplash=false\"" exit 1 @@ -118,6 +120,10 @@ while true; do LAZY_ROOTFS="true" fi ;; + "tiny") + FSTYPE=cpio.gz + TINY=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 eeadb24..5147c86 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal @@ -453,6 +453,11 @@ if [ "$MACHINE" = "akita" ]; then fi fi +if [ "x$TINY" = "xtrue" ]; then + QEMUOPTIONS="-initrd $ROOTFS -nographic" + KERNCMDLINE="console=ttyS0 root=/dev/ram0" +fi + if [ "x$QEMUOPTIONS" = "x" ]; then echo "Error: Unable to support this combination of options" cleanup