blob: 15124c1b7eeabd483c8aeda521b20b5140430f9e [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001#!/bin/bash
2
3BINPATH=$(dirname $0)
4MACHINE_PATH=$(mktemp -d)
5
6APU_ARGS=
7PMU_ARGS=
8
9while [ ! -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
17done
18
19PMU_ROM=$(last=; for i in $PMU_ARGS; do if [ "$last" = "-kernel" ]; then echo "$i"; break; fi; last=$i; done)
20if [ ! -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
26fi
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