]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemu-scripts: Add support for mips and powerpc machines, update qemuarm
authorBruce Ashfield <bruce.ashfield@windriver.com>
Fri, 9 Jul 2010 13:26:43 +0000 (14:26 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 15 Jul 2010 10:19:10 +0000 (11:19 +0100)
For mips, the malta platform emulates a cirrus chipset. With the udpated
2.6.34 kernel options, we can now enable framebuffer boot for
the qemumips platform.

We need to pass a valid cpu (603e) and do a -nographic boot to
make it all the way to a prompt so graphics is disabled for now
for ppc.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
scripts/poky-qemu-internal
scripts/runqemu

index 11178a7b5077abdbe575b0650dbebe4002123b2f..8e1ffcf24890b5c54930a25853cdb679f0e09f2f 100755 (executable)
@@ -57,6 +57,8 @@ fi
 
 case "$MACHINE" in
        "qemuarm") ;;
+       "qemumips") ;;
+       "qemuppc") ;;
        "qemuarmv6") ;;
        "qemuarmv7") ;;
        "qemux86") ;;
@@ -82,9 +84,11 @@ fi
 
 if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
     QEMU=qemu-system-arm
+    MACHINE_SUBTYPE=versatilepb
+    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
     if [ "$TYPE" = "ext3" ]; then
-        KERNCMDLINE="root=/dev/sda console=ttyAMA0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        KERNCMDLINE="root=/dev/sda console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS"
     fi
     if [ "$TYPE" = "nfs" ]; then
@@ -140,6 +144,29 @@ if [ "$MACHINE" = "spitz" ]; then
     fi
 fi
 
+if [ "$MACHINE" = "qemumips" ]; then
+    QEMU=qemu-system-mips
+    MACHINE_SUBTYPE=malta
+    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga cirrus"
+    if [ "$TYPE" = "ext3" ]; then
+        #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS"
+    fi
+fi
+
+if [ "$MACHINE" = "qemuppc" ]; then
+    QEMU=qemu-system-ppc
+    MACHINE_SUBTYPE=prep
+    CPU_SUBTYPE=603e
+    BIOS=powerpc_rom.bin
+    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic"
+    if [ "$TYPE" = "ext3" ]; then
+        KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $HDIMAGE -no-reboot $QEMU_UI_OPTIONS"
+    fi
+fi
+
 if [ "$MACHINE" = "akita" ]; then
     QEMU=qemu-system-arm
     if [ "$TYPE" = "jffs2" ]; then
index 5b444025799dce8642498b768eda69c56a2b5e34..25d30c98a921effe08c8f9dbdafdd45b02a1c863 100755 (executable)
@@ -102,6 +102,32 @@ if [ "$MACHINE" = "qemuarm" ]; then
     fi
 fi
 
+if [ "$MACHINE" = "qemumips" ]; then
+    if [ "x$ZIMAGE" = "x" ]; then
+        ZIMAGE=$BUILDDIR/tmp/deploy/images/vmlinux.bin-$MACHINE.bin
+    fi
+    if [ "$TYPE" = "ext3" ]; then
+        if [ "x$HDIMAGE" = "x" ]; then
+            T=$BUILDDIR/tmp/deploy/images
+            findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
+        fi
+    fi
+    CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr
+fi
+
+if [ "$MACHINE" = "qemuppc" ]; then
+    if [ "x$ZIMAGE" = "x" ]; then
+        ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin
+    fi
+    if [ "$TYPE" = "ext3" ]; then
+        if [ "x$HDIMAGE" = "x" ]; then
+            T=$BUILDDIR/tmp/deploy/images
+            findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
+        fi
+    fi
+    CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr
+fi
+
 if [ "$MACHINE" = "spitz" ]; then
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
@@ -144,6 +170,8 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o
     TARGET_SYS="arm-poky-linux"
 elif [ "$MACHINE" = "qemux86" ]; then
     TARGET_SYS="i586-poky-linux"
+elif [ "$MACHINE" = "qemumips" ]; then
+    TARGET_SYS="mips-poky-linux"
 fi
 
 if [ ! -e $CROSSPATH/$TARGET_SYS/bin/cc ]; then