diff options
author | Richard Purdie <richard@openedhand.com> | 2008-04-10 09:50:54 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-04-10 09:50:54 +0000 |
commit | faf55131c9b86a8646dd80ca79b44a001b88a87f (patch) | |
tree | d8127bd7dd5339145a21c1aa8c6b850f681f05b8 /scripts/poky-qemu-internal | |
parent | 5091c0bd8842b2a5f94e47c391dc6fe73eac8901 (diff) | |
download | poky-faf55131c9b86a8646dd80ca79b44a001b88a87f.tar.gz |
scripts: Add support for nokia800 to runqemu
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4226 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-x | scripts/poky-qemu-internal | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 1a8fb63b35..4ddb116130 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
@@ -30,16 +30,16 @@ | |||
30 | # HDIMAGE - the disk image file to use | 30 | # HDIMAGE - the disk image file to use |
31 | # | 31 | # |
32 | 32 | ||
33 | if [ -z "$QEMU_MEMORY" ]; then | ||
34 | QEMU_MEMORY="64M" | ||
35 | fi | ||
36 | |||
33 | QEMUIFUP=`which poky-qemu-ifup` | 37 | QEMUIFUP=`which poky-qemu-ifup` |
34 | QEMUIFDOWN=`which poky-qemu-ifdown` | 38 | QEMUIFDOWN=`which poky-qemu-ifdown` |
35 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" | 39 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" |
36 | QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$QEMUIFUP,downscript=$QEMUIFDOWN" | 40 | QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$QEMUIFUP,downscript=$QEMUIFDOWN" |
37 | KERNCMDLINE="mem=$QEMU_MEMORY" | 41 | KERNCMDLINE="mem=$QEMU_MEMORY" |
38 | 42 | ||
39 | if [ -z "$QEMU_MEMORY" ]; then | ||
40 | QEMU_MEMORY="64M" | ||
41 | fi | ||
42 | |||
43 | SERIALOPTS="" | 43 | SERIALOPTS="" |
44 | if [ "x$SERIAL_LOGFILE" != "x" ]; then | 44 | if [ "x$SERIAL_LOGFILE" != "x" ]; then |
45 | SERIALOPTS="-serial file:$SERIAL_LOGFILE" | 45 | SERIALOPTS="-serial file:$SERIAL_LOGFILE" |
@@ -50,6 +50,7 @@ case "$MACHINE" in | |||
50 | "qemux86") ;; | 50 | "qemux86") ;; |
51 | "akita") ;; | 51 | "akita") ;; |
52 | "spitz") ;; | 52 | "spitz") ;; |
53 | "nokia800") ;; | ||
53 | *) | 54 | *) |
54 | echo "Error: Unsupported machine type $MACHINE" | 55 | echo "Error: Unsupported machine type $MACHINE" |
55 | return | 56 | return |
@@ -130,13 +131,39 @@ if [ "$MACHINE" = "akita" ]; then | |||
130 | fi | 131 | fi |
131 | fi | 132 | fi |
132 | 133 | ||
134 | if [ "$MACHINE" = "nokia800" ]; then | ||
135 | QEMU=qemu-system-arm | ||
136 | if [ "$TYPE" = "jffs2" ]; then | ||
137 | HDIMAGE=`readlink -f $HDIMAGE` | ||
138 | if [ ! -e "$HDIMAGE.qemuflash" ]; then | ||
139 | #if [ ! -e "$HDIMAGE.initfs" ]; then | ||
140 | # echo "Error, $HDIMAGE.initfs must exist!" | ||
141 | # return | ||
142 | #fi | ||
143 | #if [ ! -e "$HDIMAGE.config" ]; then | ||
144 | # echo "Error, $HDIMAGE.config must exist!" | ||
145 | # return | ||
146 | #fi | ||
147 | #echo "'Flashing' config partition, please wait..." | ||
148 | #poky-nokia800-flashutil $HDIMAGE.config $HDIMAGE.qemuflash config | ||
149 | #echo "'Flashing' initfs, please wait..." | ||
150 | #poky-nokia800-flashutil $HDIMAGE.initfs $HDIMAGE.qemuflash initfs | ||
151 | echo "'Flashing' rootfs, please wait..." | ||
152 | poky-nokia800-flashutil $HDIMAGE $HDIMAGE.qemuflash | ||
153 | fi | ||
154 | KERNCMDLINE="root=/dev/mtdblock4 rootfstype=jffs2" | ||
155 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M n800 -mtdblock $HDIMAGE.qemuflash -serial vc -m 130 -serial vc -serial vc -serial vc" | ||
156 | fi | ||
157 | fi | ||
158 | |||
159 | |||
133 | if [ "x$QEMUOPTIONS" = "x" ]; then | 160 | if [ "x$QEMUOPTIONS" = "x" ]; then |
134 | echo "Error: Unable to support this combination of options" | 161 | echo "Error: Unable to support this combination of options" |
135 | return | 162 | return |
136 | fi | 163 | fi |
137 | 164 | ||
138 | SDKDIR="/usr/local/poky/eabi-glibc" | 165 | SDKDIR="/usr/local/poky/eabi-glibc" |
139 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" ]; then | 166 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then |
140 | SDKPATH="$SDKDIR/arm/arm-poky-linux-gnueabi/bin:$SDKDIR/arm/bin" | 167 | SDKPATH="$SDKDIR/arm/arm-poky-linux-gnueabi/bin:$SDKDIR/arm/bin" |
141 | fi | 168 | fi |
142 | 169 | ||