blob: bcc634ceb5b80397c104dec6e770c6d596851eec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
# XXX These parameters are currently hardcoded in the board configuration.
# XXX The script assumes an x86 host with an arm-none-eabi toolchain.
QEMU_EXE=qemu-system-arm
NR_CPUS=4
RAM=64
X15=$PWD/x15
TMPDIR=$(mktemp -d)
BIN=$TMPDIR/x15.bin
IMG=$TMPDIR/flash.img
arm-none-eabi-objcopy -O binary x15 $BIN
dd if=/dev/zero of=$IMG bs=1M seek=64 count=0
dd if=$BIN of=$IMG conv=notrunc
$QEMU_EXE \
-M virt-2.8 \
-cpu cortex-a15 \
-ctrl-grab \
-gdb tcp::1234 \
-m $RAM \
-smp $NR_CPUS \
-monitor stdio \
-drive file=$IMG,if=pflash,format=raw
rm -rf $TMPDIR
|