Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | BINPATH=$(dirname $0) |
| 4 | MACHINE_PATH=$(mktemp -d) |
| 5 | |
| 6 | APU_ARGS= |
| 7 | PMU_ARGS= |
| 8 | |
| 9 | while [ ! -z "$1" ]; do |
| 10 | if [ "$1" = "-pmu-args" ]; then |
| 11 | PMU_ARGS+=" $2" |
| 12 | shift |
| 13 | else |
| 14 | APU_ARGS+=" $1" |
| 15 | fi |
| 16 | shift |
| 17 | done |
| 18 | |
| 19 | PMU_ROM=$(last=; for i in $PMU_ARGS; do if [ "$last" = "-kernel" ]; then echo "$i"; break; fi; last=$i; done) |
| 20 | if [ ! -e $PMU_ROM ]; then |
| 21 | echo "------" |
| 22 | echo "Error: Missing PMU ROM - $PMU_ROM" |
| 23 | echo " See 'meta-xilinx/README.qemu.md' for more information on accquiring the PMU ROM." |
| 24 | echo "------" |
| 25 | exit 255 |
| 26 | fi |
| 27 | |
| 28 | # start the PMU instance |
| 29 | $BINPATH/qemu-system-microblazeel $PMU_ARGS -machine-path $MACHINE_PATH & |
| 30 | # start the APU instance |
| 31 | $BINPATH/qemu-system-aarch64 $APU_ARGS -machine-path $MACHINE_PATH |
| 32 | |