summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-30 12:23:57 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-30 12:23:57 +0000
commit3cce9ba903a35dce67c08a8344acd52a3eae3e41 (patch)
treee9f97d39fa62fe55ccb267381507dbd0fd8ece47 /scripts
parent9604533009f19b8deadb827da9bd957cf75d67ab (diff)
downloadpoky-3cce9ba903a35dce67c08a8344acd52a3eae3e41.tar.gz
scripts: Add support to scripts for spitz images
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1216 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-addptable2image32
-rwxr-xr-xscripts/poky-qemu3
-rwxr-xr-xscripts/poky-qemu-internal25
-rwxr-xr-xscripts/runqemu11
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
3IMAGE=$1
4IMAGEOUT=$2
5
6echo $IMAGE
7echo $IMAGEOUT
8
9size=`ls -l $IMAGE | awk '{ print $5}'`
10size2=`expr $size / 512 / 16 / 63`
11
12echo $size
13echo $size2
14
15# MBR Size = 512 * 63 bytes
16dd if=/dev/zero of=$IMAGEOUT count=63
17
18echo "x" > /tmp/fdisk.cmds
19echo "c" >> /tmp/fdisk.cmds
20echo "1024" >> /tmp/fdisk.cmds
21echo "h" >> /tmp/fdisk.cmds
22echo "16" >> /tmp/fdisk.cmds
23echo "r" >> /tmp/fdisk.cmds
24echo "n" >> /tmp/fdisk.cmds
25echo "p" >> /tmp/fdisk.cmds
26echo "1" >> /tmp/fdisk.cmds
27echo "1" >> /tmp/fdisk.cmds
28echo "$size2" >> /tmp/fdisk.cmds
29echo "w" >> /tmp/fdisk.cmds
30
31fdisk $IMAGEOUT < /tmp/fdisk.cmds
32cat $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
44fi 47fi
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
51fi 51fi
52 52
53if [ "$MACHINE" != "qemuarm" -a "$MACHINE" != "qemux86" -a "$MACHINE" != "akita" ]; then 53if [ "$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
56fi 56fi
@@ -91,23 +91,22 @@ fi
91 91
92if [ "$MACHINE" = "spitz" ]; then 92if [ "$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
106fi 104fi
107 105
108if [ "$MACHINE" = "akita" ]; then 106if [ "$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
46fi 49fi
47 50
48if [ "x$3" != "x" ]; then 51if [ "x$3" != "x" ]; then
@@ -68,6 +71,14 @@ if [ "$MACHINE" = "qemuarm" ]; then
68 fi 71 fi
69fi 72fi
70 73
74if [ "$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
80fi
81
71if [ "$MACHINE" = "akita" ]; then 82if [ "$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