Merge pull request #649 from ucb-bar/dir-eval
Change DIR evaluation strategy
This commit is contained in:
@@ -6,7 +6,7 @@ version: 2.1
|
|||||||
parameters:
|
parameters:
|
||||||
tools-cache-version:
|
tools-cache-version:
|
||||||
type: string
|
type: string
|
||||||
default: "v5"
|
default: "v6"
|
||||||
|
|
||||||
# default execution env.s
|
# default execution env.s
|
||||||
executors:
|
executors:
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
RDIR=$(pwd)
|
DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
CHIPYARD_DIR="${CHIPYARD_DIR:-$(git rev-parse --show-toplevel)}"
|
CHIPYARD_DIR="$(dirname "$DIR")"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: ${0} [OPTIONS] [riscv-tools | esp-tools | ec2fast]"
|
echo "usage: ${0} [OPTIONS] [riscv-tools | esp-tools | ec2fast]"
|
||||||
@@ -134,18 +134,16 @@ SRCDIR="$(pwd)/toolchains" module_all qemu --prefix="${RISCV}" --target-list=ris
|
|||||||
git submodule update --init $CHIPYARD_DIR/tools/dromajo/dromajo-src
|
git submodule update --init $CHIPYARD_DIR/tools/dromajo/dromajo-src
|
||||||
make -C $CHIPYARD_DIR/tools/dromajo/dromajo-src/src
|
make -C $CHIPYARD_DIR/tools/dromajo/dromajo-src/src
|
||||||
|
|
||||||
cd "$RDIR"
|
|
||||||
|
|
||||||
# create specific env.sh
|
# create specific env.sh
|
||||||
{
|
cat > "$CHIPYARD_DIR/env-$TOOLCHAIN.sh" <<EOF
|
||||||
echo "# auto-generated by build-toolchains.sh"
|
# auto-generated by build-toolchains.sh
|
||||||
echo "export CHIPYARD_TOOLCHAIN_SOURCED=1"
|
export CHIPYARD_TOOLCHAIN_SOURCED=1
|
||||||
echo "export RISCV=$(printf '%q' "$RISCV")"
|
export RISCV=$(printf '%q' "$RISCV")
|
||||||
echo "export PATH=\${RISCV}/bin:\${PATH}"
|
export PATH=\${RISCV}/bin:\${PATH}
|
||||||
echo "export LD_LIBRARY_PATH=\${RISCV}/lib\${LD_LIBRARY_PATH:+":\${LD_LIBRARY_PATH}"}"
|
export LD_LIBRARY_PATH=\${RISCV}/lib\${LD_LIBRARY_PATH:+":\${LD_LIBRARY_PATH}"}
|
||||||
} > env-$TOOLCHAIN.sh
|
EOF
|
||||||
|
|
||||||
# create general env.sh
|
# create general env.sh
|
||||||
echo "# line auto-generated by build-toolchains.sh" >> env.sh
|
echo "# line auto-generated by build-toolchains.sh" >> env.sh
|
||||||
echo "source \$( realpath \$(dirname "\${BASH_SOURCE[0]:-\${\(%\):-%x}}") )/env-$TOOLCHAIN.sh" >> env.sh
|
echo "source $(printf '%q' "$CHIPYARD_DIR/env-$TOOLCHAIN.sh")" >> env.sh
|
||||||
echo "Toolchain Build Complete!"
|
echo "Toolchain Build Complete!"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ case ${ncpu} in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Allow user to override MAKE
|
# Allow user to override MAKE
|
||||||
[ -n "${MAKE}" ] || MAKE=$(command -v gnumake || command -v gmake || command -v make)
|
[ -n "${MAKE:+x}" ] || MAKE=$(command -v gnumake || command -v gmake || command -v make)
|
||||||
readonly MAKE
|
readonly MAKE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ if [ "$MINGIT" != "$(echo -e "$MINGIT\n$MYGIT" | sort -V | head -n1)" ]; then
|
|||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RDIR=$(git rev-parse --show-toplevel)
|
DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
CHIPYARD_DIR="$(dirname "$DIR")"
|
||||||
|
|
||||||
# Ignore toolchain submodules
|
# Ignore toolchain submodules
|
||||||
cd "$RDIR"
|
cd "$CHIPYARD_DIR"
|
||||||
for name in toolchains/*-tools/*/ ; do
|
for name in toolchains/*-tools/*/ ; do
|
||||||
git config submodule."${name%/}".update none
|
git config submodule."${name%/}".update none
|
||||||
done
|
done
|
||||||
@@ -71,8 +72,11 @@ git config submodule.sims/firesim.update none
|
|||||||
git submodule update --init software/firemarshal
|
git submodule update --init software/firemarshal
|
||||||
|
|
||||||
# Configure firemarshal to know where our firesim installation is
|
# Configure firemarshal to know where our firesim installation is
|
||||||
if [ ! -f $RDIR/software/firemarshal/marshal-config.yaml ]; then
|
if [ ! -f ./software/firemarshal/marshal-config.yaml ]; then
|
||||||
echo "firesim-dir: '../../sims/firesim/'" > $RDIR/software/firemarshal/marshal-config.yaml
|
echo "firesim-dir: '../../sims/firesim/'" > ./software/firemarshal/marshal-config.yaml
|
||||||
fi
|
fi
|
||||||
echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> $RDIR/env.sh
|
|
||||||
echo "PATH=\$( realpath \$(dirname "\${BASH_SOURCE[0]:-\${\(%\):-%x}}") )/software/firemarshal:\$PATH" >> $RDIR/env.sh
|
echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> env.sh
|
||||||
|
echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"' >> env.sh
|
||||||
|
echo "PATH=\$__DIR/bin:\$PATH" >> env.sh
|
||||||
|
echo "PATH=\$__DIR/software/firemarshal:\$PATH" >> env.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user