[oe-commits] Khem Raj : run-qemu.sh: Add new commandline arg to specify image

git version control git at git.openembedded.org
Fri Jan 14 18:10:28 UTC 2011


Module: openembedded.git
Branch: master
Commit: 1eb54c1b78ccd23a97e4812ab9576b5bad1172c9
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1eb54c1b78ccd23a97e4812ab9576b5bad1172c9

Author: Khem Raj <raj.khem at gmail.com>
Date:   Fri Jan 14 10:04:08 2011 -0800

run-qemu.sh: Add new commandline arg to specify image

* This was earlier hardcoded in the script so you needed to
  modify the script everytime you wanted a different image to boot

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 contrib/qemu/run-qemu.sh |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/contrib/qemu/run-qemu.sh b/contrib/qemu/run-qemu.sh
index 6350022..4dbd5b7 100755
--- a/contrib/qemu/run-qemu.sh
+++ b/contrib/qemu/run-qemu.sh
@@ -57,11 +57,14 @@
 #		is disabled
 
 supported_archs="{arm mips mips64 mipsel mips64el ppc sh4 x86}"
-if [ $# -lt 2 ]; then
+if [ $# -lt 3 ]; then
     echo -en "
-    Usage: `basename $0` <arch> <libc> [single|empty]
+    Usage: `basename $0` <arch> <libc> <image> [single|empty]
     where <arch> is one $supported_archs
-    libc is uclibc glibc or eglibc (used in the deploy directory)
+    <libc> is uclibc glibc or eglibc (used in the deploy directory)
+    <image> is OE image that you would like to boot for list of
+    available images look into <OE-metadata>/recipes/images
+    some common images are console-image, x11-image, minimalist-image
     single may be passed to use /bin/sh as init or omitted.
     Example: `basename $0` arm eglibc
 "
@@ -70,6 +73,7 @@ fi
 
 arch=$1
 libc=$2
+image=$3
 mem=256				# memory for guest server in Mb
 imagetype="ext3"
 networking="no"
@@ -86,7 +90,6 @@ case $arch in
 	rootdisk="sda"
 	qemuopts="-nographic"
 	kernel="zImage"
-	image="native-sdk-image"
 	;;
     mips)
 	address="192.168.1.102"
@@ -97,7 +100,6 @@ case $arch in
 	rootdisk="hda"
 	qemuopts="-nographic"
 	kernel="vmlinux"
-	image="native-sdk-image"
 	;;
     mipsel)
 	address="192.168.1.103"
@@ -108,7 +110,6 @@ case $arch in
 	rootdisk="hda"
 	qemuopts="-nographic"
 	kernel="vmlinux"
-	image="native-sdk-image"
 	;;
     ppc|powerpc)
 	arch=ppc
@@ -121,7 +122,6 @@ case $arch in
 	rootdisk="hdc"
 	qemuopts="-nographic"
 	kernel="vmlinux"
-	image="console-image"
 	;;
     sh|sh4)
 	arch=sh4
@@ -134,7 +134,6 @@ case $arch in
 	rootdisk="sda"
 	qemuopts="-monitor null -serial vc -serial stdio"
 	kernel="zImage"
-	image="minimalist-image"
 	;;
     x86)
 	address="192.168.1.106"
@@ -144,9 +143,8 @@ case $arch in
 	mem="1024"
 	consoleopt="console=ttyS0"
 	rootdisk="hda"
-	qemuopts=""
+	qemuopts="-nographic"
 	kernel="bzImage"
-	image="minimalist-image"
 	;;
     mips64)
 	address="192.168.1.107"
@@ -158,7 +156,6 @@ case $arch in
 	rootdisk="hda"
 	qemuopts="-nographic"
 	kernel="vmlinux"
-	image="minimalist-image"
 	;;
     mips64el)
 	address="192.168.1.108"
@@ -170,7 +167,6 @@ case $arch in
 	rootdisk="hda"
 	qemuopts="-nographic"
 	kernel="vmlinux"
-	image="minimalist-image"
 	;;
     *)
 	echo "Specify one architectures out of $supported_archs to emulate."





More information about the Openembedded-commits mailing list