summaryrefslogtreecommitdiff
path: root/tools/qemu_arm.sh
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-10-25 01:23:52 +0200
committerRichard Braun <rbraun@sceen.net>2017-10-25 01:23:52 +0200
commitae620e83e4a2a9ea6915e148443db783b10c64dc (patch)
tree9e0116b10e3623fbfa8b34e428aac3606392ed84 /tools/qemu_arm.sh
parent1c7097201991af66baa89d4bbb465292f3b86c29 (diff)
Improve qemu/arm script
Diffstat (limited to 'tools/qemu_arm.sh')
-rwxr-xr-xtools/qemu_arm.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/qemu_arm.sh b/tools/qemu_arm.sh
index 4c2a0a15..d73e7131 100755
--- a/tools/qemu_arm.sh
+++ b/tools/qemu_arm.sh
@@ -22,11 +22,12 @@ KVM=
X15=$PWD/x15
TMPDIR=$(mktemp -d)
-FLASH=$TMPDIR/flash
+BIN=$TMPDIR/x15.bin
+IMG=$TMPDIR/flash.img
-arm-none-eabi-objcopy -O binary x15 x15.bin
-dd if=/dev/zero of=flash.img bs=1M count=64
-dd if=x15.bin of=flash.img conv=notrunc
+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 $KVM \
-M virt-2.8 \
@@ -35,6 +36,6 @@ $QEMU_EXE $KVM \
-m $RAM \
-smp $NR_CPUS \
-monitor stdio \
- -pflash flash.img
+ -drive file=$IMG,if=pflash,format=raw
rm -rf $TMPDIR