| # Copyright 2021 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| if [ "${BASH_SOURCE-}" = "$0" ]; then |
| echo -e "This script should be sourced, not run:\nsource $0" >&2 |
| # Exports environment variables needed by parts of this project. |
| HPS_ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")") |
| # We completely overwrite any existing PATH. This ensures that we're not getting |
| # things from unexpected places. |
| PATH="/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" |
| PATH="/opt/hps-sdk/bin:${PATH}" |
| PATH="${HPS_ROOT}/scripts:${PATH}" |
| # This speeds up recompilation of verilator generated code quit a bit. |
| for i in "${HPS_ROOT}/third_party/python"/*; do |
| PYTHONPATH="${PYTHONPATH}:${i}" |
| # List of directories with Rust source |