From 2e9fa01b64903884c7a9685b8ec06980418a1b48 Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Mon, 2 Aug 2021 22:02:18 +0800 Subject: [PATCH 1/4] generate the .sbtopt file during repo initialization **Related issue**: #932 and #880 **Type of change**: other enhancement **Impact**: other (change a repo initialization script) **Release Notes** change a repo initialization script [init-submodules-no-riscv-tools-nolog.sh](https://github.com/zslwyuan/chipyard/blob/master/scripts/init-submodules-no-riscv-tools-nolog.sh) so it can generate the .sbtopt file in the Chipyard directory during repo initialization and use the absolute path for the SBT workspace variables in .sbtopts. Hope it can adapt to more compilation scenarios. For example, now users should be able to open the shipyard project directly using Intellij. --- scripts/init-submodules-no-riscv-tools-nolog.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index 2d2e920c..0d47dd03 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -81,3 +81,5 @@ echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> env.sh echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"' >> env.sh echo "PATH=\$__DIR/bin:\$PATH" >> env.sh echo "PATH=\$__DIR/software/firemarshal:\$PATH" >> env.sh +echo "-Dsbt.sourcemode=true" > .sbtopts +echo "-Dsbt.workspace=$CHIPYARD_DIR/tools" >> .sbtopts From 4a7bcd054bf98abc78ff8902fed2e29237e88fa9 Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Tue, 24 Aug 2021 02:33:16 +0800 Subject: [PATCH 2/4] Delete .sbtopts Delete .sbtopt since it will be generated by the script for repo initialization --- .sbtopts | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .sbtopts diff --git a/.sbtopts b/.sbtopts deleted file mode 100644 index 2358d787..00000000 --- a/.sbtopts +++ /dev/null @@ -1,2 +0,0 @@ --Dsbt.sourcemode=true --Dsbt.workspace=$PWD/tools From 32a4810f63bbec123536873fba20dda3223c90ca Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Tue, 24 Aug 2021 02:36:53 +0800 Subject: [PATCH 3/4] Update the .gitignore to not track .sbtops update the .gitignore to not track .sbtops --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 257d2c58..7c0f02bf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ tags env-riscv-tools.sh env-esp-tools.sh .bsp/ +.sbtopts From 15a5ac0d7abfc3201386f424917432eaa084367f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 23 Aug 2021 15:23:06 -0700 Subject: [PATCH 4/4] Push .sbtopt CI fix --- .circleci/do-rtl-build.sh | 3 +++ .circleci/run-firesim-scala-tests.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh index a13412e3..3a5d56ca 100755 --- a/.circleci/do-rtl-build.sh +++ b/.circleci/do-rtl-build.sh @@ -21,6 +21,9 @@ cd $LOCAL_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh ./scripts/init-fpga.sh +# replace the workspace dir with a local dir so you can copy around +sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts + # set stricthostkeychecking to no (must happen before rsync) run "echo \"Ping $SERVER\"" diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh index a2525297..23c4d08a 100755 --- a/.circleci/run-firesim-scala-tests.sh +++ b/.circleci/run-firesim-scala-tests.sh @@ -22,6 +22,9 @@ cd $LOCAL_CHIPYARD_DIR/sims/firesim ./scripts/build-libdwarf.sh cd $LOCAL_CHIPYARD_DIR +# replace the workspace dir with a local dir so you can copy around +sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts + make -C $LOCAL_CHIPYARD_DIR/tools/dromajo/dromajo-src/src # set stricthostkeychecking to no (must happen before rsync)