summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-04-25 15:47:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-21 09:59:03 +0100
commitf13ef77b5d462fe27c5b0151ff9c4b346f595d1f (patch)
tree832c36f464829a90babd8abe9fe70b3757d6a96d /scripts
parent4cbc27c3e3d0ecc14dbc8560f7a8eb23d2e6557d (diff)
downloadpoky-f13ef77b5d462fe27c5b0151ff9c4b346f595d1f.tar.gz
runqemu: Add qemush4 and qemumips64 knowledge
New machines need to be added and they also have different kernel commandlines (From OE-Core rev: 3a5432aec0faea49d2c04984cd169ceb35bba89f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu10
-rwxr-xr-xscripts/runqemu-internal35
2 files changed, 40 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index fc7363fdd8..1e803edd1b 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -94,7 +94,7 @@ KVM_ENABLED="no"
94while true; do 94while true; do
95 arg=${1} 95 arg=${1}
96 case "$arg" in 96 case "$arg" in
97 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemuppc") 97 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumips64" | "qemush4" | "qemuppc")
98 [ -z "$MACHINE" ] && MACHINE=$arg || \ 98 [ -z "$MACHINE" ] && MACHINE=$arg || \
99 error "conflicting MACHINE types [$MACHINE] and [$arg]" 99 error "conflicting MACHINE types [$MACHINE] and [$arg]"
100 ;; 100 ;;
@@ -223,7 +223,7 @@ if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
223fi 223fi
224 224
225if [ -z "$MACHINE" ]; then 225if [ -z "$MACHINE" ]; then
226 MACHINE=`basename $KERNEL | sed 's/.*-\(qemux86-64\|qemux86\|qemuarm\|qemumips\|qemuppc\).*/\1/'` 226 MACHINE=`basename $KERNEL | sed 's/.*-\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
227 if [ -z "$MACHINE" ]; then 227 if [ -z "$MACHINE" ]; then
228 error "Unable to set MACHINE from kernel filename [$KERNEL]" 228 error "Unable to set MACHINE from kernel filename [$KERNEL]"
229 fi 229 fi
@@ -245,6 +245,12 @@ QEMUARM_DEFAULT_FSTYPE=ext3
245QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin 245QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
246QEMUMIPS_DEFAULT_FSTYPE=ext3 246QEMUMIPS_DEFAULT_FSTYPE=ext3
247 247
248QEMUMIPS64_DEFAULT_KERNEL=vmlinux-qemumips64.bin
249QEMUMIPS64_DEFAULT_FSTYPE=ext3
250
251QEMUSH4_DEFAULT_KERNEL=vmlinux-qemumips.bin
252QEMUSH4_DEFAULT_FSTYPE=ext3
253
248QEMUPPC_DEFAULT_KERNEL=vmlinux-qemuppc.bin 254QEMUPPC_DEFAULT_KERNEL=vmlinux-qemuppc.bin
249QEMUPPC_DEFAULT_FSTYPE=ext3 255QEMUPPC_DEFAULT_FSTYPE=ext3
250 256
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index fe2974ba48..c8e31864ab 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -51,12 +51,15 @@ else
51 "qemuarm") 51 "qemuarm")
52 mem_size=128 52 mem_size=128
53 ;; 53 ;;
54 "qemumips") 54 "qemumips"|"qemumips64")
55 mem_size=128 55 mem_size=128
56 ;; 56 ;;
57 "qemuppc") 57 "qemuppc")
58 mem_size=128 58 mem_size=128
59 ;; 59 ;;
60 "qemush4")
61 mem_size=1024
62 ;;
60 *) 63 *)
61 mem_size=64 64 mem_size=64
62 ;; 65 ;;
@@ -233,6 +236,8 @@ fi
233case "$MACHINE" in 236case "$MACHINE" in
234 "qemuarm") ;; 237 "qemuarm") ;;
235 "qemumips") ;; 238 "qemumips") ;;
239 "qemumips64") ;;
240 "qemush4") ;;
236 "qemuppc") ;; 241 "qemuppc") ;;
237 "qemuarmv6") ;; 242 "qemuarmv6") ;;
238 "qemuarmv7") ;; 243 "qemuarmv7") ;;
@@ -370,8 +375,12 @@ if [ "$MACHINE" = "spitz" ]; then
370 fi 375 fi
371fi 376fi
372 377
373if [ "$MACHINE" = "qemumips" ]; then 378if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumips64" ]; then
374 QEMU=qemu-system-mips 379 if [ "$MACHINE" = "qemumips64" ]; then
380 QEMU=qemu-system-mips64
381 else
382 QEMU=qemu-system-mips
383 fi
375 MACHINE_SUBTYPE=malta 384 MACHINE_SUBTYPE=malta
376 QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS" 385 QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
377 if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then 386 if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
@@ -411,6 +420,26 @@ if [ "$MACHINE" = "qemuppc" ]; then
411 fi 420 fi
412fi 421fi
413 422
423if [ "$MACHINE" = "qemush4" ]; then
424 QEMU=qemu-system-sh4
425 MACHINE_SUBTYPE=r2d
426 QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
427 if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
428 #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
429 KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
430 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
431 fi
432 if [ "$FSTYPE" = "nfs" ]; then
433 if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
434 echo "Error: NFS mount point $ROOTFS doesn't exist"
435 cleanup
436 return
437 fi
438 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"
439 QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
440 fi
441fi
442
414if [ "$MACHINE" = "akita" ]; then 443if [ "$MACHINE" = "akita" ]; then
415 QEMU=qemu-system-arm 444 QEMU=qemu-system-arm
416 if [ "$FSTYPE" = "jffs2" ]; then 445 if [ "$FSTYPE" = "jffs2" ]; then