Externals/cross-compiler - Update to compile for both cross and native
[tpg/acess2.git] / RunQemuArm
1 #!/bin/sh
2 #qemu-system-arm -M realview-pb-a8 -kernel Acess2.arm7.bin -serial stdio
3
4 QEMU=qemu-system-arm
5 USE_GDB=
6
7 _SYSTEM=realview-pb-a8
8 _KERNEL=Acess2.armv7-realview_pb.bin
9
10 QEMU_PARAMS=""
11 _NETTYPE="user"
12 TEE="| tee QemuLog.txt"
13
14 while [ $# -ne 0 ]; do
15         case $1 in
16         -raspberrypi)
17                 _SYSTEM="versatilepb"
18                 QEMU_PARAMS=$QEMU_PARAMS" -cpu arm1176 -m 192 -localtime"
19                 _KERNEL=Acess2.armv6-raspberrypi.bin
20                 ;;
21         -tegra2)
22                 # git://repo.or.cz/qemu/afaerber.git BRANCH tegra
23                 QEMU=~/apps_exp/bin/qemu-system-arm
24                 # - Toshiba AC100
25                 _SYSTEM="ac100"
26                 _KERNEL=Acess2.armv7-tegra2.bin
27                 QEMU_PARAMS=$QEMU_PARAMS" -net nic,model=rtl8169"
28                 QEMU_PARAMS=$QEMU_PARAMS" -drive id=test_usb_image,file=USB_Test_Image.img,if=none"
29                 QEMU_PARAMS=$QEMU_PARAMS" -device usb-storage,drive=test_usb_image"
30                 ;;
31         -gdb)
32                 QEMU_PARAMS=$QEMU_PARAMS" -s -S"
33                 ;;
34         -extramem)
35                 QEMU_PARAMS=$QEMU_PARAMS" -m 768"
36                 ;;
37         -e)
38                 shift
39                 QEMU_PARAMS=$QEMU_PARAMS" "$1
40                 ;;
41         -bin)
42                 shift
43                 QEMU=$1
44                 ;;
45         -tuntap)
46                 _NETTYPE="tap"
47                 ;;
48         -notee)
49                 TEE=""
50                 ;;
51         esac
52         shift
53 done
54 QEMU_PARAMS="-M $_SYSTEM -kernel KernelLand/$_KERNEL -net $_NETTYPE"$QEMU_PARAMS
55
56 #       /home/tpg/apps/bin/qemu-system-x86_64 $QEMU_PARAMS -serial stdio -serial file:QemuLog.txt
57 #       qemu-system-x86_64 $QEMU_PARAMS -serial stdio | tee QemuLog.txt
58 eval $QEMU $QEMU_PARAMS -serial stdio $TEE

UCC git Repository :: git.ucc.asn.au