Skip to contentSkip to conversation

runqemu/mips: adjust runqemu script to support mipsel machine

PATCH Superseded Dennis Lan 2 participants 4 messages Jul 11, 2012 – Jul 12, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dennis Lan

author
#0 lore raw

PATCH 1/1 runqemu/mips: adjust runqemu script to support mipsel machine

---
 scripts/runqemu          |    5 ++++-
 scripts/runqemu-internal |    9 +++------
 2 files changed, 7 insertions(+), 7 deletions(-)
scripts/runqemu +4 -1
index 8d149a2..650d1df 100755
@@ -94,7 +94,7 @@ KVM_ENABLED="no"
 while true; do
     arg=${1}
     case "$arg" in
-        "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumips64" | "qemush4"  | "qemuppc")
+        "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | "qemumips64" | "qemush4"  | "qemuppc")
             [ -z "$MACHINE" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
@@ -245,6 +245,9 @@ QEMUARM_DEFAULT_FSTYPE=ext3
 QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
 QEMUMIPS_DEFAULT_FSTYPE=ext3
 
+QEMUMIPSEL_DEFAULT_KERNEL=vmlinux-qemumipsel.bin
+QEMUMIPSEL_DEFAULT_FSTYPE=ext3
+
 QEMUMIPS64_DEFAULT_KERNEL=vmlinux-qemumips64.bin
 QEMUMIPS64_DEFAULT_FSTYPE=ext3
 
scripts/runqemu-internal +3 -6
index 041464d..bdf1a37 100755
@@ -236,6 +236,7 @@ fi
 case "$MACHINE" in
     "qemuarm") ;;
     "qemumips") ;;
+    "qemumipsel") ;;
     "qemumips64") ;;
     "qemush4") ;;
     "qemuppc") ;;
@@ -375,12 +376,8 @@ if [ "$MACHINE" = "spitz" ]; then
     fi
 fi
 
-if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumips64" ]; then
-    if [ "$MACHINE" = "qemumips64" ]; then
-	QEMU=qemu-system-mips64
-    else
-	QEMU=qemu-system-mips
-    fi
+if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
+    QEMU=${MACHINE/qemu/qemu-system-}
     MACHINE_SUBTYPE=malta
     QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
     if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
Signature · 1 line
1.7.9.rc2
#1 lore raw
Quoted 57 lines · Dennis Lan
---
 scripts/runqemu          |    5 ++++-
 scripts/runqemu-internal |    9 +++------
 2 files changed, 7 insertions(+), 7 deletions(-)
scripts/runqemu +4 -1
index 8d149a2..650d1df 100755
@@ -94,7 +94,7 @@ KVM_ENABLED="no"
 while true; do
     arg=${1}
     case "$arg" in
-        "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumips64" | "qemush4"  | "qemuppc")
+        "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | "qemumips64" | "qemush4"  | "qemuppc")
             [ -z "$MACHINE" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
@@ -245,6 +245,9 @@ QEMUARM_DEFAULT_FSTYPE=ext3
 QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
 QEMUMIPS_DEFAULT_FSTYPE=ext3
 
+QEMUMIPSEL_DEFAULT_KERNEL=vmlinux-qemumipsel.bin
+QEMUMIPSEL_DEFAULT_FSTYPE=ext3
+
 QEMUMIPS64_DEFAULT_KERNEL=vmlinux-qemumips64.bin
 QEMUMIPS64_DEFAULT_FSTYPE=ext3
 
scripts/runqemu-internal +3 -7
index 041464d..bdf1a37 100755
@@ -236,6 +236,7 @@ fi
 case "$MACHINE" in
     "qemuarm") ;;
     "qemumips") ;;
+    "qemumipsel") ;;
     "qemumips64") ;;
     "qemush4") ;;
     "qemuppc") ;;
@@ -375,12 +376,8 @@ if [ "$MACHINE" = "spitz" ]; then
     fi
 fi
 
-if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumips64" ]; then
-    if [ "$MACHINE" = "qemumips64" ]; then
-       QEMU=qemu-system-mips64
-    else
-       QEMU=qemu-system-mips
-    fi
+if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
+    QEMU=${MACHINE/qemu/qemu-system-}
     MACHINE_SUBTYPE=malta
     QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
     if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
--
Quoted 2 lines

1.7.9.rc2

hi all:
any comment? suggestion or rejection?

Dennis

#2 lore raw
Quoted 9 lines · On Thursday 12 July 2012 11:08:40 Dennis.Yxun wrote:

scripts/runqemu-internal if [ "$MACHINE" = "spitz" ]; then · line 380

Quoted 8 lines · Dennis Lan
scripts/runqemu-internal +2 -6
-if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumips64" ]; then
-    if [ "$MACHINE" = "qemumips64" ]; then
-       QEMU=qemu-system-mips64
-    else
-       QEMU=qemu-system-mips
-    fi
+if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
+    QEMU=${MACHINE/qemu/qemu-system-}

Unfortunately substitution like this is a bashism (i.e. does not work in purely POSIX-compliant shells such as dash). Can you rework this?

Thanks,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 14 lines · Paul Eggleton
Quoted 9 lines · On Thursday 12 July 2012 11:08:40 Dennis.Yxun wrote:

scripts/runqemu-internal if [ "$MACHINE" = "spitz" ]; then · line 380

Quoted 8 lines · Dennis Lan
scripts/runqemu-internal +2 -6
-if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumips64" ]; then
-    if [ "$MACHINE" = "qemumips64" ]; then
-       QEMU=qemu-system-mips64
-    else
-       QEMU=qemu-system-mips
-    fi
+if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
+    QEMU=${MACHINE/qemu/qemu-system-}

Unfortunately substitution like this is a bashism (i.e. does not work in purely POSIX-compliant shells such as dash). Can you rework this?

Quoted 7 lines

Thanks,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

re-sent with patch v2