Skip to content

Commit e45e0c8

Browse files
committed
Change init-submodules script to do a lite-clone by default
1 parent 23bcc54 commit e45e0c8

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

scripts/init-submodules-no-riscv-tools-nolog.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,20 @@ common_setup
1313

1414
function usage
1515
{
16-
echo "Usage: $0"
16+
echo "Usage: $0 <options>"
1717
echo "Initialize Chipyard submodules and setup initial env.sh script."
18+
echo "By default, this will only initialize minimally required submodules"
19+
echo "Enable other submodules with the --full or submodule-specific flags"
20+
echo ""
21+
echo "Options:"
22+
echo " -h Display this help message"
23+
echo " --full Initialize all submodules"
24+
echo " --ara Initialize the ara submodule"
1825
echo ""
1926
}
2027

28+
ENABLE_ARA=""
29+
2130
while test $# -gt 0
2231
do
2332
case "$1" in
@@ -27,6 +36,12 @@ do
2736
;;
2837
--force | -f | --skip-validate) # Deprecated flags
2938
;;
39+
--full)
40+
ENABLE_ARA=1
41+
;;
42+
--ara)
43+
ENABLE_ARA=1
44+
;;
3045
*)
3146
echo "ERROR: bad argument $1"
3247
usage
@@ -118,8 +133,10 @@ cd "$RDIR"
118133
git -C generators/nvdla submodule update --init src/main/resources/hw
119134

120135
# Non-recursive clone to exclude ara submods
121-
git submodule update --init generators/ara
122-
git -C generators/ara submodule update --init ara
136+
if [[ "$ENABLE_ARA" -eq 1 ]] ; then
137+
git submodule update --init generators/ara
138+
git -C generators/ara submodule update --init ara
139+
fi
123140

124141
# Non-recursive clone to exclude gemmini-software
125142
git submodule update --init generators/gemmini

0 commit comments

Comments
 (0)