toolchains: Optionally build riscv-openocd with a separate script
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -50,6 +50,9 @@
|
|||||||
[submodule "toolchains/riscv-tools/riscv-tests"]
|
[submodule "toolchains/riscv-tools/riscv-tests"]
|
||||||
path = toolchains/riscv-tools/riscv-tests
|
path = toolchains/riscv-tools/riscv-tests
|
||||||
url = https://github.com/riscv/riscv-tests.git
|
url = https://github.com/riscv/riscv-tests.git
|
||||||
|
[submodule "toolchains/riscv-tools/riscv-openocd"]
|
||||||
|
path = toolchains/riscv-tools/riscv-openocd
|
||||||
|
url = https://github.com/riscv/riscv-openocd.git
|
||||||
[submodule "vlsi/hammer"]
|
[submodule "vlsi/hammer"]
|
||||||
path = vlsi/hammer
|
path = vlsi/hammer
|
||||||
url = https://github.com/ucb-bar/hammer.git
|
url = https://github.com/ucb-bar/hammer.git
|
||||||
|
|||||||
24
scripts/build-openocd.sh
Executable file
24
scripts/build-openocd.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# exit script if any command fails
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
RDIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
if [ -z "${RISCV}" ] ; then
|
||||||
|
! [ -r "${RDIR}/env.sh" ] || . "${RDIR}/env.sh"
|
||||||
|
if [ -z "${RISCV}" ] ; then
|
||||||
|
echo "${0}: set the RISCV environment variable to desired install path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
SRCDIR="${RDIR}/toolchains/riscv-tools"
|
||||||
|
. "${RDIR}/scripts/build-util.sh"
|
||||||
|
|
||||||
|
git config --unset submodule.toolchains/riscv-tools/riscv-openocd.update || :
|
||||||
|
module_prepare riscv-openocd
|
||||||
|
module_run riscv-openocd ./bootstrap
|
||||||
|
module_build riscv-openocd --prefix="${RISCV}" \
|
||||||
|
--enable-remote-bitbang --enable-jtag_vpi --disable-werror
|
||||||
1
toolchains/riscv-tools/riscv-openocd
Submodule
1
toolchains/riscv-tools/riscv-openocd
Submodule
Submodule toolchains/riscv-tools/riscv-openocd added at 7c82a7b9d5
Reference in New Issue
Block a user