From 5e3d1a605d787b7bd02a2361ababd4954c7a7656 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 4 Nov 2020 11:57:23 -0800 Subject: [PATCH] Add --ignore-qemu flag to toolchains | Prepare QEMU when it builds --- scripts/build-toolchains.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index 2685872e..9ceb8808 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -20,6 +20,7 @@ usage() { echo "Options" echo " --prefix PREFIX : Install destination. If unset, defaults to $(pwd)/riscv-tools-install" echo " or $(pwd)/esp-tools-install" + echo " --ignore-qemu : Ignore installing QEMU" echo " --help -h : Display this message" exit "$1" } @@ -34,6 +35,7 @@ die() { TOOLCHAIN="riscv-tools" EC2FASTINSTALL="false" +IGNOREQEMU="false" RISCV="" # getopts does not support long options, and is inflexible @@ -45,6 +47,9 @@ do -p | --prefix ) shift RISCV=$(realpath $1) ;; + --ignore-qemu ) + shift + IGNOREQEMU="true" ;; riscv-tools | esp-tools) TOOLCHAIN=$1 ;; ec2fast ) @@ -109,7 +114,7 @@ else *) false ;; esac; ) || die 'obsolete make version; need GNU make 4.x or later' - module_prepare riscv-gnu-toolchain qemu + module_prepare riscv-gnu-toolchain module_build riscv-gnu-toolchain --prefix="${RISCV}" --with-cmodel=medany echo '==> Building GNU/Linux toolchain' module_make riscv-gnu-toolchain linux @@ -128,7 +133,9 @@ module_all riscv-tests --prefix="${RISCV}/riscv64-unknown-elf" SRCDIR="$(pwd)/toolchains" module_all libgloss --prefix="${RISCV}/riscv64-unknown-elf" --host=riscv64-unknown-elf +if [ "${IGNOREQEMU}" = false ] ; then SRCDIR="$(pwd)/toolchains" module_all qemu --prefix="${RISCV}" --target-list=riscv64-softmmu +fi # make Dromajo git submodule update --init $CHIPYARD_DIR/tools/dromajo/dromajo-src