diff options
| author | Richard Purdie <richard@openedhand.com> | 2007-01-29 17:03:29 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2007-01-29 17:03:29 +0000 |
| commit | 86db48cd17bb2853e2074cc5625e005faf09ce87 (patch) | |
| tree | f90650f61251d9c315ae0dc72b52c13f67ede295 /scripts | |
| parent | e41b8ef74998222758622b7ba4fdd94da4be57c3 (diff) | |
| download | poky-86db48cd17bb2853e2074cc5625e005faf09ce87.tar.gz | |
scripts: Add framework for supporting akita images under qemu
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1214 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/poky-qemu | 11 | ||||
| -rwxr-xr-x | scripts/poky-qemu-internal | 17 | ||||
| -rwxr-xr-x | scripts/runqemu | 12 |
3 files changed, 26 insertions, 14 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 6c53b07723..9a5ed7722e 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
| @@ -29,16 +29,19 @@ else | |||
| 29 | ZIMAGE=$1 | 29 | ZIMAGE=$1 |
| 30 | fi | 30 | fi |
| 31 | 31 | ||
| 32 | if [ "x$MACHINE" = "x" ]; then | ||
| 33 | MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` | ||
| 34 | fi | ||
| 35 | |||
| 32 | if [ "x$2" = "x" ]; then | 36 | if [ "x$2" = "x" ]; then |
| 33 | TYPE="nfs" | 37 | TYPE="nfs" |
| 34 | else | 38 | else |
| 35 | TYPE="ext2" | 39 | TYPE="ext2" |
| 40 | if [ "$MACHINE" = "akita" ]; then | ||
| 41 | TYPE="jffs2" | ||
| 42 | fi | ||
| 36 | HDIMAGE=$2 | 43 | HDIMAGE=$2 |
| 37 | fi | 44 | fi |
| 38 | 45 | ||
| 39 | if [ "x$MACHINE" = "x" ]; then | ||
| 40 | MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` | ||
| 41 | fi | ||
| 42 | |||
| 43 | INTERNAL_SCRIPT=`which poky-qemu-internal` | 46 | INTERNAL_SCRIPT=`which poky-qemu-internal` |
| 44 | . $INTERNAL_SCRIPT | 47 | . $INTERNAL_SCRIPT |
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index a88f52ace8..ab4ee5e616 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
| @@ -50,7 +50,7 @@ if [ ! -f "$ZIMAGE" ]; then | |||
| 50 | exit 1 | 50 | exit 1 |
| 51 | fi | 51 | fi |
| 52 | 52 | ||
| 53 | if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" ]; then | 53 | if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita" ]; then |
| 54 | echo "Error, unsupported machine type $MACHINE" | 54 | echo "Error, unsupported machine type $MACHINE" |
| 55 | exit 1 | 55 | exit 1 |
| 56 | fi | 56 | fi |
| @@ -107,14 +107,13 @@ fi | |||
| 107 | 107 | ||
| 108 | if [ "$MACHINE" = "akita" ]; then | 108 | if [ "$MACHINE" = "akita" ]; then |
| 109 | QEMU=`which qemu-system-arm` | 109 | QEMU=`which qemu-system-arm` |
| 110 | # QEMU=/usr/local/bin/qemu-system-arm | 110 | if [ "$TYPE" = "jffs2" ]; then |
| 111 | # if [ "$TYPE" = "ext2" ]; then | 111 | if [ ! -e "$HDIMAGE.qemuflash" ]; then |
| 112 | # if [ "x$HDIMAGE" = "x" ]; then | 112 | echo "Converting raw image into flash image format for use by QEMU, please wait..." |
| 113 | # HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-akita.jffs2 | 113 | raw2flash.akita < $HDIMAGE > $HDIMAGE.qemuflash |
| 114 | # HDIMAGE=$BUILDDIR/tmp/deploy/images/akita.test | 114 | fi |
| 115 | # fi | 115 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -mtdblock $HDIMAGE.qemuflash -vertical" |
| 116 | # QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -hdd $HDIMAGE" | 116 | fi |
| 117 | # fi | ||
| 118 | fi | 117 | fi |
| 119 | 118 | ||
| 120 | if [ "x$QEMUOPTIONS" = "x" ]; then | 119 | if [ "x$QEMUOPTIONS" = "x" ]; then |
diff --git a/scripts/runqemu b/scripts/runqemu index d3643a626e..aa37974091 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -40,6 +40,9 @@ if [ "x$2" != "x" ]; then | |||
| 40 | TYPE=$2 | 40 | TYPE=$2 |
| 41 | else | 41 | else |
| 42 | TYPE="ext2" | 42 | TYPE="ext2" |
| 43 | if [ "$MACHINE" = "akita" ]; then | ||
| 44 | TYPE="jffs2" | ||
| 45 | fi | ||
| 43 | fi | 46 | fi |
| 44 | 47 | ||
| 45 | if [ "x$3" != "x" ]; then | 48 | if [ "x$3" != "x" ]; then |
| @@ -57,7 +60,6 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o | |||
| 57 | CROSSPATH=$BUILDDIR/tmp/cross/arm-poky-linux/bin | 60 | CROSSPATH=$BUILDDIR/tmp/cross/arm-poky-linux/bin |
| 58 | fi | 61 | fi |
| 59 | 62 | ||
| 60 | |||
| 61 | if [ "$MACHINE" = "qemuarm" ]; then | 63 | if [ "$MACHINE" = "qemuarm" ]; then |
| 62 | if [ "$TYPE" = "ext2" ]; then | 64 | if [ "$TYPE" = "ext2" ]; then |
| 63 | if [ "x$HDIMAGE" = "x" ]; then | 65 | if [ "x$HDIMAGE" = "x" ]; then |
| @@ -66,6 +68,14 @@ if [ "$MACHINE" = "qemuarm" ]; then | |||
| 66 | fi | 68 | fi |
| 67 | fi | 69 | fi |
| 68 | 70 | ||
| 71 | if [ "$MACHINE" = "akita" ]; then | ||
| 72 | if [ "$TYPE" = "jffs2" ]; then | ||
| 73 | if [ "x$HDIMAGE" = "x" ]; then | ||
| 74 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-akita.jffs2 | ||
| 75 | fi | ||
| 76 | fi | ||
| 77 | fi | ||
| 78 | |||
| 69 | if [ "$MACHINE" = "qemux86" ]; then | 79 | if [ "$MACHINE" = "qemux86" ]; then |
| 70 | if [ "x$ZIMAGE" = "x" ]; then | 80 | if [ "x$ZIMAGE" = "x" ]; then |
| 71 | ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin | 81 | ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin |
