diff --git a/.circleci/build-toolchains.sh b/.circleci/build-toolchains.sh index 6965da30..d0be57c2 100755 --- a/.circleci/build-toolchains.sh +++ b/.circleci/build-toolchains.sh @@ -6,9 +6,13 @@ # turn echo on and error on earliest command set -ex +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + if [ ! -d "$HOME/$1-install" ]; then cd $HOME # init all submodules including the tools - CHIPYARD_DIR=$HOME/project ./project/scripts/build-toolchains.sh $1 + CHIPYARD_DIR=$LOCAL_CHIPYARD_DIR .$LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 fi diff --git a/.circleci/check-commit.sh b/.circleci/check-commit.sh index ea7e30f5..4ad48ed5 100755 --- a/.circleci/check-commit.sh +++ b/.circleci/check-commit.sh @@ -5,8 +5,12 @@ # turn echo on and error on earliest command set -ex +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + # enter bhd repo -cd $HOME/project +cd $LOCAL_CHIPYARD_DIR # initialize submodules and get the hashes git submodule update --init @@ -22,7 +26,7 @@ search () { done } -submodules=("boom" "hwacha" "rocket-chip" "sifive-blocks" "testchipip") +submodules=("boom" "firechip" "hwacha" "icenet" "rocket-chip" "sifive-blocks" "sifive-cache" "testchipip") dir="generators" search diff --git a/.circleci/create-hash.sh b/.circleci/create-hash.sh index 2aff9727..84a75244 100755 --- a/.circleci/create-hash.sh +++ b/.circleci/create-hash.sh @@ -5,8 +5,12 @@ # turn echo on and error on earliest command set -ex +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + # enter bhd repo -cd $HOME/project +cd $LOCAL_CHIPYARD_DIR # get the version of riscv-tools from the git submodule hash git submodule status | grep "riscv-tools" | awk '{print$1}' | grep -o "[[:alnum:]]*" >> $HOME/riscv-tools.hash diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index 78c4a350..b639009e 100755 --- a/.circleci/defaults.sh +++ b/.circleci/defaults.sh @@ -16,6 +16,7 @@ clean () { # remote variables REMOTE_WORK_DIR=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH-$CIRCLE_SHA1-$CIRCLE_JOB REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install +REMOTE_ESP_DIR=$REMOTE_WORK_DIR/esp-tools-install REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard REMOTE_VERILATOR_DIR=$REMOTE_WORK_DIR/verilator REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verisim @@ -23,6 +24,7 @@ REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verisim # local variables (aka within the docker container) LOCAL_CHECKOUT_DIR=$HOME/project LOCAL_RISCV_DIR=$HOME/riscv-tools-install -LOCAL_CHIPYARD_DIR=$HOME/chipyard +LOCAL_ESP_DIR=$HOME/esp-tools-install +LOCAL_CHIPYARD_DIR=$LOCAL_CHECKOUT_DIR LOCAL_VERILATOR_DIR=$HOME/verilator LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verisim