scripts: Initialize firesim non-recursively (#388)
This commit is contained in:
committed by
Sagar Karandikar
parent
ca653c0305
commit
d7d7c79c22
@@ -6,25 +6,6 @@ set -o pipefail
|
|||||||
|
|
||||||
RDIR=$(git rev-parse --show-toplevel)
|
RDIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
_usage() {
|
|
||||||
echo "usage: ${0} [--no-firesim]" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
NO_FIRESIM=false
|
|
||||||
while getopts 'h-:' opt ; do
|
|
||||||
case ${opt} in
|
|
||||||
-)
|
|
||||||
case ${OPTARG} in
|
|
||||||
no-firesim) NO_FIRESIM=true ;;
|
|
||||||
*) echo "invalid option: --${OPTARG}" >&2 ; _usage ;;
|
|
||||||
esac ;;
|
|
||||||
h) _usage ;;
|
|
||||||
*) echo "invalid option: -${opt}" >&2 ; _usage ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND - 1))
|
|
||||||
|
|
||||||
# Ignore toolchain submodules
|
# Ignore toolchain submodules
|
||||||
cd "$RDIR"
|
cd "$RDIR"
|
||||||
for name in toolchains/*-tools/*/ ; do
|
for name in toolchains/*-tools/*/ ; do
|
||||||
@@ -56,16 +37,17 @@ git config --unset submodule.vlsi/hammer-synopsys-plugins.update
|
|||||||
git config --unset submodule.vlsi/hammer-mentor-plugins.update
|
git config --unset submodule.vlsi/hammer-mentor-plugins.update
|
||||||
|
|
||||||
git config --unset submodule.generators/sha3.update
|
git config --unset submodule.generators/sha3.update
|
||||||
# Shallow clone by default (recursive clone would get linux)
|
# Non-recursive clone to exclude riscv-linux
|
||||||
git submodule update --init generators/sha3
|
git submodule update --init generators/sha3
|
||||||
|
|
||||||
if [ $NO_FIRESIM = false ]; then
|
git config --unset submodule.sims/firesim.update
|
||||||
echo "initializing firesim"
|
# Minimal non-recursive clone to initialize sbt dependencies
|
||||||
# Renable firesim and init only the required submodules to provide
|
git submodule update --init sims/firesim
|
||||||
# all required scala deps, without doing a full build-setup
|
(
|
||||||
git config --unset submodule.sims/firesim.update
|
cd sims/firesim
|
||||||
git submodule update --init sims/firesim
|
# Initialize dependencies for MIDAS-level RTL simulation
|
||||||
git -C sims/firesim submodule update --init sim/midas
|
git submodule update --init sim/midas
|
||||||
git -C sims/firesim submodule update --init --recursive sw/firesim-software
|
# Exclude riscv-linux
|
||||||
git config submodule.sims/firesim.update none
|
git submodule update --init sw/firesim-software
|
||||||
fi
|
)
|
||||||
|
git config submodule.sims/firesim.update none
|
||||||
|
|||||||
Reference in New Issue
Block a user