From f6d8beed756292caab3e6d4232844e7dc834bb01 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 18 Mar 2022 11:47:09 -0700 Subject: [PATCH 1/4] Don't shallow clone submodules (revert #1064) --- .github/scripts/check-commit.sh | 3 --- .gitmodules | 44 --------------------------------- 2 files changed, 47 deletions(-) diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index ec9e73db..cd3199d1 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -24,9 +24,6 @@ search_submodule() { echo "Running check on submodule $submodule in $dir" # Initialize submodule and get the hashes git submodule update --init $dir/$submodule - git -C $dir/$submodule fetch --unshallow - git -C $dir/$submodule config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git -C $dir/$submodule fetch origin status=$(git submodule status) hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*") diff --git a/.gitmodules b/.gitmodules index d2d618ab..11ca0d5a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,47 +1,36 @@ [submodule "rocket-chip"] path = generators/rocket-chip url = https://github.com/chipsalliance/rocket-chip.git - shallow = true [submodule "testchipip"] path = generators/testchipip url = https://github.com/ucb-bar/testchipip.git - shallow = true [submodule "barstools"] path = tools/barstools url = https://github.com/ucb-bar/barstools.git - shallow = true [submodule "tools/torture"] path = tools/torture url = https://github.com/ucb-bar/riscv-torture.git - shallow = true [submodule "generators/boom"] path = generators/boom url = https://github.com/riscv-boom/riscv-boom.git - shallow = true [submodule "generators/sifive-blocks"] path = generators/sifive-blocks url = https://github.com/sifive/sifive-blocks.git - shallow = true [submodule "generators/hwacha"] path = generators/hwacha url = https://github.com/ucb-bar/hwacha.git - shallow = true [submodule "sims/firesim"] path = sims/firesim url = https://github.com/firesim/firesim.git - shallow = true [submodule "generators/icenet"] path = generators/icenet url = https://github.com/firesim/icenet.git - shallow = true [submodule "generators/block-inclusivecache-sifive"] path = generators/sifive-cache url = https://github.com/sifive/block-inclusivecache-sifive.git - shallow = true [submodule "toolchains/riscv-tools/riscv-gnu-toolchain"] path = toolchains/riscv-tools/riscv-gnu-toolchain url = https://github.com/riscv/riscv-gnu-toolchain.git - shallow = true [submodule "toolchains/riscv-tools/riscv-gnu-toolchain-prebuilt"] path = toolchains/riscv-tools/riscv-gnu-toolchain-prebuilt url = https://github.com/ucb-bar/chipyard-toolchain-prebuilt.git @@ -49,132 +38,99 @@ [submodule "toolchains/riscv-tools/riscv-isa-sim"] path = toolchains/riscv-tools/riscv-isa-sim url = https://github.com/riscv/riscv-isa-sim.git - shallow = true [submodule "toolchains/riscv-tools/riscv-pk"] path = toolchains/riscv-tools/riscv-pk url = https://github.com/riscv/riscv-pk.git - shallow = true [submodule "toolchains/riscv-tools/riscv-tests"] path = toolchains/riscv-tools/riscv-tests url = https://github.com/riscv/riscv-tests.git - shallow = true [submodule "toolchains/riscv-tools/riscv-openocd"] path = toolchains/riscv-tools/riscv-openocd url = https://github.com/riscv/riscv-openocd.git - shallow = true [submodule "toolchains/esp-tools/riscv-gnu-toolchain"] path = toolchains/esp-tools/riscv-gnu-toolchain url = https://github.com/ucb-bar/esp-gnu-toolchain.git - shallow = true [submodule "toolchains/esp-tools/riscv-isa-sim"] path = toolchains/esp-tools/riscv-isa-sim url = https://github.com/ucb-bar/esp-isa-sim.git - shallow = true [submodule "toolchains/esp-tools/riscv-pk"] path = toolchains/esp-tools/riscv-pk url = https://github.com/riscv/riscv-pk.git - shallow = true [submodule "toolchains/esp-tools/riscv-tests"] path = toolchains/esp-tools/riscv-tests url = https://github.com/ucb-bar/esp-tests.git - shallow = true [submodule "toolchains/libgloss"] path = toolchains/libgloss url = https://github.com/ucb-bar/libgloss-htif.git - shallow = true [submodule "vlsi/hammer"] path = vlsi/hammer url = https://github.com/ucb-bar/hammer.git - shallow = true [submodule "tools/dsptools"] path = tools/dsptools url = https://github.com/ucb-bar/dsptools.git - shallow = true [submodule "tools/chisel-testers"] path = tools/chisel-testers url = https://github.com/freechipsproject/chisel-testers.git - shallow = true [submodule "generators/sha3"] path = generators/sha3 url = https://github.com/ucb-bar/sha3.git - shallow = true [submodule "vlsi/hammer-cadence-plugins"] path = vlsi/hammer-cadence-plugins url = https://github.com/ucb-bar/hammer-cadence-plugins.git - shallow = true [submodule "vlsi/hammer-synopsys-plugins"] path = vlsi/hammer-synopsys-plugins url = https://github.com/ucb-bar/hammer-synopsys-plugins.git - shallow = true [submodule "vlsi/hammer-mentor-plugins"] path = vlsi/hammer-mentor-plugins url = https://github.com/ucb-bar/hammer-mentor-plugins.git - shallow = true [submodule "toolchains/qemu"] path = toolchains/qemu url = https://github.com/qemu/qemu.git - shallow = true [submodule "tools/axe"] path = tools/axe url = https://github.com/CTSRD-CHERI/axe.git - shallow = true [submodule "software/spec2017"] path = software/spec2017 url = https://github.com/ucb-bar/spec2017-workload.git - shallow = true [submodule "software/coremark"] path = software/coremark url = https://github.com/ucb-bar/coremark-workload.git - shallow = true [submodule "generators/gemmini"] path = generators/gemmini url = https://github.com/ucb-bar/gemmini - shallow = true [submodule "software/firemarshal"] path = software/firemarshal url = https://github.com/firesim/FireMarshal.git - shallow = true [submodule "generators/cva6"] path = generators/cva6 url = https://github.com/ucb-bar/cva6-wrapper.git - shallow = true [submodule "tools/DRAMSim2"] path = tools/DRAMSim2 url = https://github.com/firesim/DRAMSim2.git - shallow = true [submodule "generators/nvdla"] path = generators/nvdla url = https://github.com/ucb-bar/nvdla-wrapper.git - shallow = true [submodule "software/nvdla-workload"] path = software/nvdla-workload url = https://github.com/ucb-bar/nvdla-workload.git - shallow = true [submodule "tools/dromajo/dromajo-src"] path = tools/dromajo/dromajo-src url = https://github.com/riscv-boom/dromajo.git - shallow = true [submodule "generators/riscv-sodor"] path = generators/riscv-sodor url = https://github.com/ucb-bar/riscv-sodor.git - shallow = true [submodule "fpga/fpga-shells"] path = fpga/fpga-shells url = https://github.com/sifive/fpga-shells.git - shallow = true [submodule "tools/api-config-chipsalliance"] path = tools/api-config-chipsalliance url = https://github.com/chipsalliance/api-config-chipsalliance.git - shallow = true [submodule "tools/rocket-dsp-utils"] path = tools/rocket-dsp-utils url = https://github.com/ucb-bar/rocket-dsp-utils - shallow = true [submodule "generators/ibex"] path = generators/ibex url = https://github.com/ucb-bar/ibex-wrapper - shallow = true [submodule "generators/fft-generator"] path = generators/fft-generator url = https://github.com/ucb-bar/FFTGenerator.git - shallow = true From 786f9ca2455f7d9a9626ae66efad74b68f6c7cf9 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 2 Apr 2022 23:27:10 -0700 Subject: [PATCH 2/4] Move back status init outside loop --- .github/scripts/check-commit.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index cd3199d1..bb2ba376 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -17,15 +17,15 @@ git config submodule.vlsi/hammer-cadence-plugins.update none git config submodule.vlsi/hammer-mentor-plugins.update none git config submodule.vlsi/hammer-synopsys-plugins.update none +# initialize submodules and get the hashes +git submodule update --init +status=$(git submodule status) + all_names=() search_submodule() { echo "Running check on submodule $submodule in $dir" - # Initialize submodule and get the hashes - git submodule update --init $dir/$submodule - - status=$(git submodule status) hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*") for branch in "${branches[@]}" do From 5f041c097044ccca15a8b0d74d8208e725e366ef Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 2 Apr 2022 23:56:20 -0700 Subject: [PATCH 3/4] Add more debugging prints --- .github/scripts/check-commit.sh | 1 - scripts/init-submodules-no-riscv-tools-nolog.sh | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index bb2ba376..fad8806a 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -9,7 +9,6 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# enter bhd repo cd $LOCAL_CHIPYARD_DIR # ignore the private vlsi submodules diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index b41e0ba0..e2379ecc 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -107,10 +107,14 @@ cd "$CHIPYARD_DIR" _unskip() { git config --local --unset-all "submodule.${1}.update" || : ; } trap 'git_submodule_exclude _unskip' EXIT INT TERM + set -x git_submodule_exclude _skip git submodule update --init --recursive #--jobs 8 + set +x ) +set -x + # Non-recursive clone to exclude riscv-linux git submodule update --init generators/sha3 @@ -125,6 +129,8 @@ git config --local submodule.sims/firesim.update none # Only shallow clone needed for basic SW tests git submodule update --init software/firemarshal +set +x + # Configure firemarshal to know where our firesim installation is if [ ! -f ./software/firemarshal/marshal-config.yaml ]; then echo "firesim-dir: '../../sims/firesim/'" > ./software/firemarshal/marshal-config.yaml From 3c775c5adfc8fdb105f0080394525cbabaa98178 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Apr 2022 10:36:31 -0700 Subject: [PATCH 4/4] `cd` into CY 1st in FireSim CI tests --- .github/scripts/remote-run-firesim-scala-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/remote-run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh index 6fe52586..1b75d29f 100755 --- a/.github/scripts/remote-run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -18,6 +18,7 @@ export PATH="$RISCV/bin:$PATH" # This would generally be handled by build-setup.sh/firesim-setup.sh REMOTE_FIRESIM_SYSROOT=$REMOTE_FIRESIM_DIR/lib-install +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh --skip-validate cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib git submodule update --init elfutils libdwarf