You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
339 B
Bash

#!/bin/bash
qemu_args=()
while [[ "$1" != "" ]]
do
case "$1" in
-Wq,*) qemu_args+=("$(echo "$1" | cut -d, -f2-)");;
*) break;;
esac
shift
done
xlen="$(readelf -h $1 | grep 'Class' | cut -d: -f 2 | xargs echo | sed 's/^ELF//')"
QEMU_CPU=${QEMU_CPU} qemu-riscv$xlen -r 5.10 "${qemu_args[@]}" -L ${RISC_V_SYSROOT} "$@"