Add --ignore-qemu flag to toolchains | Prepare QEMU when it builds
This commit is contained in:
@@ -20,6 +20,7 @@ usage() {
|
|||||||
echo "Options"
|
echo "Options"
|
||||||
echo " --prefix PREFIX : Install destination. If unset, defaults to $(pwd)/riscv-tools-install"
|
echo " --prefix PREFIX : Install destination. If unset, defaults to $(pwd)/riscv-tools-install"
|
||||||
echo " or $(pwd)/esp-tools-install"
|
echo " or $(pwd)/esp-tools-install"
|
||||||
|
echo " --ignore-qemu : Ignore installing QEMU"
|
||||||
echo " --help -h : Display this message"
|
echo " --help -h : Display this message"
|
||||||
exit "$1"
|
exit "$1"
|
||||||
}
|
}
|
||||||
@@ -34,6 +35,7 @@ die() {
|
|||||||
|
|
||||||
TOOLCHAIN="riscv-tools"
|
TOOLCHAIN="riscv-tools"
|
||||||
EC2FASTINSTALL="false"
|
EC2FASTINSTALL="false"
|
||||||
|
IGNOREQEMU="false"
|
||||||
RISCV=""
|
RISCV=""
|
||||||
|
|
||||||
# getopts does not support long options, and is inflexible
|
# getopts does not support long options, and is inflexible
|
||||||
@@ -45,6 +47,9 @@ do
|
|||||||
-p | --prefix )
|
-p | --prefix )
|
||||||
shift
|
shift
|
||||||
RISCV=$(realpath $1) ;;
|
RISCV=$(realpath $1) ;;
|
||||||
|
--ignore-qemu )
|
||||||
|
shift
|
||||||
|
IGNOREQEMU="true" ;;
|
||||||
riscv-tools | esp-tools)
|
riscv-tools | esp-tools)
|
||||||
TOOLCHAIN=$1 ;;
|
TOOLCHAIN=$1 ;;
|
||||||
ec2fast )
|
ec2fast )
|
||||||
@@ -109,7 +114,7 @@ else
|
|||||||
*) false ;;
|
*) false ;;
|
||||||
esac; ) || die 'obsolete make version; need GNU make 4.x or later'
|
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
|
module_build riscv-gnu-toolchain --prefix="${RISCV}" --with-cmodel=medany
|
||||||
echo '==> Building GNU/Linux toolchain'
|
echo '==> Building GNU/Linux toolchain'
|
||||||
module_make riscv-gnu-toolchain linux
|
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
|
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
|
SRCDIR="$(pwd)/toolchains" module_all qemu --prefix="${RISCV}" --target-list=riscv64-softmmu
|
||||||
|
fi
|
||||||
|
|
||||||
# make Dromajo
|
# make Dromajo
|
||||||
git submodule update --init $CHIPYARD_DIR/tools/dromajo/dromajo-src
|
git submodule update --init $CHIPYARD_DIR/tools/dromajo/dromajo-src
|
||||||
|
|||||||
Reference in New Issue
Block a user