[MINI2440] New Start Script for qemu
[sniper_test.git] / mini2440 / mini2440_start.sh
blob71eace8c75d955b7f35d7a3fcee6d832403b9bfb
1 #!/bin/bash
3 base=$(dirname $0)
5 echo Starting in $base
7 name_nand="$base/mini2440_nand.bin"
8 name_sd="$base/mini2440_sd.img"
10 if [ ! -f "$name_nand" ]; then
11 echo $0 : creating NAND empty image : "$name_nand"
12 dd if=/dev/zero of="$name_nand" bs=528 count=131072
14 #if [ -f "$name_sd" ]; then
15 # optional="$optional -sd $name_sd"
16 # optional=""
17 # use a real SD card
18 optional="$optional -sd /dev/sdd"
19 #fi
20 # remove old socket
21 rm -rf .mini2440_monitor
23 cmd="$base/../arm-softmmu/qemu-system-arm \
24 -M mini2440 -m 66 \
25 -semihosting \
26 -serial stdio \
27 -kernel /tftpboot/uImage \
28 -mtdblock "$name_nand" \
29 $optional \
30 -show-cursor -usb -usbdevice keyboard \
31 -net nic,vlan=0 \
32 -net tap,vlan=0,ifname=tap0 \
33 -monitor unix:.mini2440_monitor,server,nowait"
35 echo $cmd
36 $cmd