]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts: Add framework for supporting akita images under qemu
authorRichard Purdie <richard@openedhand.com>
Mon, 29 Jan 2007 17:03:29 +0000 (17:03 +0000)
committerRichard Purdie <richard@openedhand.com>
Mon, 29 Jan 2007 17:03:29 +0000 (17:03 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1214 311d38ba-8fff-0310-9ca6-ca027cbcb966

scripts/poky-qemu
scripts/poky-qemu-internal
scripts/runqemu

index 6c53b0772322b33ab01710b98b43cc7cdf31afad..9a5ed7722eb1f35fa5121e98340ef617f7a06da1 100755 (executable)
@@ -29,16 +29,19 @@ else
     ZIMAGE=$1
 fi
 
+if [ "x$MACHINE" = "x" ]; then
+    MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'`
+fi
+
 if [ "x$2" = "x" ]; then
     TYPE="nfs"
 else
     TYPE="ext2"
+    if [ "$MACHINE" = "akita" ]; then
+        TYPE="jffs2"
+    fi
     HDIMAGE=$2
 fi
 
-if [ "x$MACHINE" = "x" ]; then
-    MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'`
-fi
-
 INTERNAL_SCRIPT=`which poky-qemu-internal`
 . $INTERNAL_SCRIPT
index a88f52ace8fc802460a5a94d7cdb4a684f9ff359..ab4ee5e6161bbb1fd445fa14831b0808c723e41f 100755 (executable)
@@ -50,7 +50,7 @@ if [ ! -f "$ZIMAGE" ]; then
     exit 1
 fi
 
-if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" ]; then
+if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita" ]; then
     echo "Error, unsupported machine type $MACHINE"
     exit 1
 fi
@@ -107,14 +107,13 @@ fi
 
 if [ "$MACHINE" = "akita" ]; then
     QEMU=`which qemu-system-arm`
-#    QEMU=/usr/local/bin/qemu-system-arm
-#    if [ "$TYPE" = "ext2" ]; then
-#        if [ "x$HDIMAGE" = "x" ]; then
-#           HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-akita.jffs2
-#           HDIMAGE=$BUILDDIR/tmp/deploy/images/akita.test
-#        fi
-#        QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -hdd $HDIMAGE"
-#    fi
+    if [ "$TYPE" = "jffs2" ]; then
+        if [ ! -e "$HDIMAGE.qemuflash" ]; then
+            echo "Converting raw image into flash image format for use by QEMU, please wait..."
+           raw2flash.akita < $HDIMAGE > $HDIMAGE.qemuflash
+        fi
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -mtdblock $HDIMAGE.qemuflash -vertical"
+    fi
 fi
 
 if [ "x$QEMUOPTIONS" = "x" ]; then
index d3643a626e200c9d0a0d62570905445262a4efe6..aa379740918945ac1c9622192e76c1fe6ffcfb68 100755 (executable)
@@ -40,6 +40,9 @@ if [ "x$2" != "x" ]; then
     TYPE=$2
 else
     TYPE="ext2"
+    if [ "$MACHINE" = "akita" ]; then
+        TYPE="jffs2"
+    fi
 fi
 
 if [ "x$3" != "x" ]; then
@@ -57,7 +60,6 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o
     CROSSPATH=$BUILDDIR/tmp/cross/arm-poky-linux/bin
 fi
 
-
 if [ "$MACHINE" = "qemuarm" ]; then
     if [ "$TYPE" = "ext2" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
@@ -66,6 +68,14 @@ if [ "$MACHINE" = "qemuarm" ]; then
     fi
 fi
 
+if [ "$MACHINE" = "akita" ]; then
+    if [ "$TYPE" = "jffs2" ]; then
+        if [ "x$HDIMAGE" = "x" ]; then
+           HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-akita.jffs2
+        fi
+    fi
+fi
+
 if [ "$MACHINE" = "qemux86" ]; then
     if [ "x$ZIMAGE" = "x" ]; then
         ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin