From 060d550c60265ad8aaf74b51b937053f2beed724 Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Wed, 29 Jan 2020 17:33:29 -0500 Subject: [PATCH] Be more specific in our check for whether or not to override marshal's configuration. --- build-setup-nolog.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build-setup-nolog.sh b/build-setup-nolog.sh index d62a1cbe..f8a105a7 100644 --- a/build-setup-nolog.sh +++ b/build-setup-nolog.sh @@ -65,10 +65,12 @@ git config submodule.target-design/chipyard.update none git submodule update --init --recursive #--jobs 8 if [ "$IS_LIBRARY" = false ]; then - # Detect if the chipyard submodule is being initialized for the first time (true) - # or being re-initialized (false). Note that 'git submodule status' is - # wrong when the module was skipped via 'chipyard.update none'. - if [ `ls -1A target-design/chipyard | wc -l` -eq 0 ]; then + # This checks if firemarshal has already been configured by someone. If + # not, we will provide our own config. This must be checked before calling + # init-submodules-no-riscv-tools.sh because that will configure + # firemarshal. + marshal_cfg=$RDIR/target-design/chipyard/software/firemarshal/marshal-config.yaml + if [ ! -f $marshal_cfg ]; then first_init=true else first_init=false @@ -83,7 +85,6 @@ if [ "$IS_LIBRARY" = false ]; then # Configure firemarshal to know where our firesim installation is. # If this is a fresh init of chipyard, we can safely overwrite the marshal # config, otherwise we have to assume the user might have changed it - marshal_cfg=$RDIR/target-design/chipyard/software/firemarshal/marshal-config.yaml if [ $first_init = true ]; then echo "firesim-dir: '../../../../'" > $marshal_cfg fi