diff options
| -rwxr-xr-x | scripts/poky-addptable2image | 32 | ||||
| -rwxr-xr-x | scripts/poky-qemu | 3 | ||||
| -rwxr-xr-x | scripts/poky-qemu-internal | 25 | ||||
| -rwxr-xr-x | scripts/runqemu | 11 |
4 files changed, 58 insertions, 13 deletions
diff --git a/scripts/poky-addptable2image b/scripts/poky-addptable2image new file mode 100755 index 0000000000..8602e5f085 --- /dev/null +++ b/scripts/poky-addptable2image | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | IMAGE=$1 | ||
| 4 | IMAGEOUT=$2 | ||
| 5 | |||
| 6 | echo $IMAGE | ||
| 7 | echo $IMAGEOUT | ||
| 8 | |||
| 9 | size=`ls -l $IMAGE | awk '{ print $5}'` | ||
| 10 | size2=`expr $size / 512 / 16 / 63` | ||
| 11 | |||
| 12 | echo $size | ||
| 13 | echo $size2 | ||
| 14 | |||
| 15 | # MBR Size = 512 * 63 bytes | ||
| 16 | dd if=/dev/zero of=$IMAGEOUT count=63 | ||
| 17 | |||
| 18 | echo "x" > /tmp/fdisk.cmds | ||
| 19 | echo "c" >> /tmp/fdisk.cmds | ||
| 20 | echo "1024" >> /tmp/fdisk.cmds | ||
| 21 | echo "h" >> /tmp/fdisk.cmds | ||
| 22 | echo "16" >> /tmp/fdisk.cmds | ||
| 23 | echo "r" >> /tmp/fdisk.cmds | ||
| 24 | echo "n" >> /tmp/fdisk.cmds | ||
| 25 | echo "p" >> /tmp/fdisk.cmds | ||
| 26 | echo "1" >> /tmp/fdisk.cmds | ||
| 27 | echo "1" >> /tmp/fdisk.cmds | ||
| 28 | echo "$size2" >> /tmp/fdisk.cmds | ||
| 29 | echo "w" >> /tmp/fdisk.cmds | ||
| 30 | |||
| 31 | fdisk $IMAGEOUT < /tmp/fdisk.cmds | ||
| 32 | cat $IMAGE >> $IMAGEOUT \ No newline at end of file | ||
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 9a5ed7722e..c2ba0c4ed7 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
| @@ -40,6 +40,9 @@ else | |||
| 40 | if [ "$MACHINE" = "akita" ]; then | 40 | if [ "$MACHINE" = "akita" ]; then |
| 41 | TYPE="jffs2" | 41 | TYPE="jffs2" |
| 42 | fi | 42 | fi |
| 43 | if [ "$MACHINE" = "spitz" ]; then | ||
| 44 | TYPE="ext3" | ||
| 45 | fi | ||
| 43 | HDIMAGE=$2 | 46 | HDIMAGE=$2 |
| 44 | fi | 47 | fi |
| 45 | 48 | ||
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index ab4ee5e616..4149e9e8a9 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" -a "$MACHINE" != "akita" ]; then | 53 | if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita" -a "$MACHINE" != "spitz" ]; 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 |
| @@ -91,23 +91,22 @@ fi | |||
| 91 | 91 | ||
| 92 | if [ "$MACHINE" = "spitz" ]; then | 92 | if [ "$MACHINE" = "spitz" ]; then |
| 93 | QEMU=`which qemu-system-arm` | 93 | QEMU=`which qemu-system-arm` |
| 94 | # QEMU=/usr/local/bin/qemu-system-arm | 94 | if [ "$TYPE" = "ext3" ]; then |
| 95 | # if [ "$TYPE" = "ext2" ]; then | 95 | echo $HDIMAGE |
| 96 | # if [ "x$HDIMAGE" = "x" ]; then | 96 | HDIMAGE=`readlink -f $HDIMAGE` |
| 97 | # HDIMAGE=`readlink -f $BUILDDIR/tmp/deploy/images/oh-image-sdk-spitz.ext2` | 97 | echo $HDIMAGE |
| 98 | # if [ ! -e $HDIMAGE.mbr ]; then | 98 | if [ ! -e "$HDIMAGE.qemudisk" ]; then |
| 99 | # cp $OEROOT/mbr.bin $HDIMAGE.mbr | 99 | echo "Adding a partition table to the ext3 image for use by QEMU, please wait..." |
| 100 | # cat $HDIMAGE >> $HDIMAGE.mbr | 100 | poky-addptable2image $HDIMAGE $HDIMAGE.qemudisk |
| 101 | # fi | 101 | fi |
| 102 | # HDIMAGE=$BUILDDIR/tmp/deploy/images/hdaimage.bin | 102 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M spitz -hda $HDIMAGE.qemudisk -vertical" |
| 103 | # fi | 103 | fi |
| 104 | # QEMUOPTIONS="-append \"root=/dev/sda mem=$QEMU_MEMORY\" $QEMU_NETWORK_CMD -M spitz -hda $HDIMAGE" | ||
| 105 | # fi | ||
| 106 | fi | 104 | fi |
| 107 | 105 | ||
| 108 | if [ "$MACHINE" = "akita" ]; then | 106 | if [ "$MACHINE" = "akita" ]; then |
| 109 | QEMU=`which qemu-system-arm` | 107 | QEMU=`which qemu-system-arm` |
| 110 | if [ "$TYPE" = "jffs2" ]; then | 108 | if [ "$TYPE" = "jffs2" ]; then |
| 109 | HDIMAGE=`readlink -f $HDIMAGE` | ||
| 111 | if [ ! -e "$HDIMAGE.qemuflash" ]; then | 110 | if [ ! -e "$HDIMAGE.qemuflash" ]; then |
| 112 | echo "Converting raw image into flash image format for use by QEMU, please wait..." | 111 | echo "Converting raw image into flash image format for use by QEMU, please wait..." |
| 113 | raw2flash.akita < $HDIMAGE > $HDIMAGE.qemuflash | 112 | raw2flash.akita < $HDIMAGE > $HDIMAGE.qemuflash |
diff --git a/scripts/runqemu b/scripts/runqemu index aa37974091..4c1e2ef78b 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -43,6 +43,9 @@ else | |||
| 43 | if [ "$MACHINE" = "akita" ]; then | 43 | if [ "$MACHINE" = "akita" ]; then |
| 44 | TYPE="jffs2" | 44 | TYPE="jffs2" |
| 45 | fi | 45 | fi |
| 46 | if [ "$MACHINE" = "spitz" ]; then | ||
| 47 | TYPE="ext3" | ||
| 48 | fi | ||
| 46 | fi | 49 | fi |
| 47 | 50 | ||
| 48 | if [ "x$3" != "x" ]; then | 51 | if [ "x$3" != "x" ]; then |
| @@ -68,6 +71,14 @@ if [ "$MACHINE" = "qemuarm" ]; then | |||
| 68 | fi | 71 | fi |
| 69 | fi | 72 | fi |
| 70 | 73 | ||
| 74 | if [ "$MACHINE" = "spitz" ]; then | ||
| 75 | if [ "$TYPE" = "ext3" ]; then | ||
| 76 | if [ "x$HDIMAGE" = "x" ]; then | ||
| 77 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-spitz.ext3 | ||
| 78 | fi | ||
| 79 | fi | ||
| 80 | fi | ||
| 81 | |||
| 71 | if [ "$MACHINE" = "akita" ]; then | 82 | if [ "$MACHINE" = "akita" ]; then |
| 72 | if [ "$TYPE" = "jffs2" ]; then | 83 | if [ "$TYPE" = "jffs2" ]; then |
| 73 | if [ "x$HDIMAGE" = "x" ]; then | 84 | if [ "x$HDIMAGE" = "x" ]; then |
