Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions scripts/build-alsa-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ declare -a COMMIT_ID=(
)

# Directory where repositories will be cloned/updated.
if [[ -z "$SOF_WORKSPACE" ]]; then
# Environment variable is empty or unset so use default
BASE_DIR="$HOME/work/sof"
else
# Environment variable exists and has a value
BASE_DIR="$SOF_WORKSPACE"
if [ -z "${SOF_WORKSPACE}" ]; then
# fallback to the script directory default path
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
SOF_REPO=$(dirname "$SCRIPT_DIR")
SOF_WORKSPACE="$SOF_REPO/../"
echo "Using default SOF environment at $SOF_WORKSPACE"
fi

# Environment variable exists and has a value
BASE_DIR="$SOF_WORKSPACE"

# Arguments to pass to ./configure for each repository. Add or remove
declare -a CONFIGURE_ARGS=(
"--prefix=${BASE_DIR}/tools"
Expand Down
19 changes: 9 additions & 10 deletions scripts/gen-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
# so that the python packages are available (and more up to date than
# the system packages).

# check if Zephyr environment is set up
if [ ! -z "$ZEPHYR_BASE" ]; then
VENV_DIR="$ZEPHYR_BASE/.venv"
echo "Using Zephyr environment at $ZEPHYR_BASE"
elif [ ! -z "$SOF_WORKSPACE" ]; then
VENV_DIR="$SOF_WORKSPACE/zephyr/.venv"
echo "Using SOF/Zephyr environment at $SOF_WORKSPACE"
# check if SOF workspace environment is set up
if [ ! -z "$SOF_WORKSPACE" ]; then
VENV_DIR="$SOF_WORKSPACE/.venv"
echo "Using SOF environment at $SOF_WORKSPACE"
else
# fallback to the zephyr default from the getting started guide
VENV_DIR="$HOME/zephyrproject/.venv"
echo "Using default Zephyr environment at $VENV_DIR"
# fallback to the script directory default path
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
SOF_REPO=$(dirname "$SCRIPT_DIR")
VENV_DIR="$SOF_REPO/../.venv"
echo "Using default SOF environment at $VENV_DIR"
fi

# start the virtual environment
Expand Down
7 changes: 5 additions & 2 deletions scripts/sof-testbench-build-profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ MODULES_S32="asrc dcblock drc drc_multiband eqfir eqiir gain src tdfb"
MODULES_S24="aria"

if [ -z "${SOF_WORKSPACE}" ]; then
echo "Error: environment variable SOF_WORKSPACE need to be set to top level sof directory"
exit 1
# fallback to the script directory default path
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
SOF_REPO=$(dirname "$SCRIPT_DIR")
SOF_WORKSPACE="$SOF_REPO/../"
echo "Using default SOF environment at $SOF_WORKSPACE"
fi

PLATFORM=none
Expand Down
7 changes: 5 additions & 2 deletions scripts/sof-testbench-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ usage() {
}

if [ -z "${SOF_WORKSPACE}" ]; then
echo "Error: environment variable SOF_WORKSPACE need to be set to top level sof directory"
exit 1
# fallback to the script directory default path
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
SOF_REPO=$(dirname "$SCRIPT_DIR")
SOF_WORKSPACE="$SOF_REPO/../"
echo "Using default SOF environment at $SOF_WORKSPACE"
fi

OUTWAV=
Expand Down
19 changes: 9 additions & 10 deletions scripts/vscode-task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
# Simple helper script for vscode task support.
# Current vscode tasks have difficulty executing multiple commands.

# check if Zephyr environment is set up
if [ ! -z "$ZEPHYR_BASE" ]; then
VENV_DIR="$ZEPHYR_BASE/.venv"
echo "Using Zephyr environment at $ZEPHYR_BASE"
elif [ ! -z "$SOF_WORKSPACE" ]; then
VENV_DIR="$SOF_WORKSPACE/zephyr/.venv"
echo "Using SOF/Zephyr environment at $SOF_WORKSPACE"
# check if SOF workspace environment is set up
if [ ! -z "$SOF_WORKSPACE" ]; then
VENV_DIR="$SOF_WORKSPACE/.venv"
echo "Using SOF environment at $SOF_WORKSPACE"
else
# fallback to the zephyr default from the getting started guide
VENV_DIR="$HOME/zephyrproject/.venv"
echo "Using default Zephyr environment at $VENV_DIR"
# fallback to the script directory default path
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
SOF_REPO=$(dirname "$SCRIPT_DIR")
VENV_DIR="$SOF_REPO/../.venv"
echo "Using default SOF environment at $VENV_DIR"
fi

# start the virtual environment
Expand Down
6 changes: 4 additions & 2 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def parse_args():
sign must be used (https://bugs.python.org/issue9334)""",
)

# Firmware deployment options using signing key based links
parser.add_argument("--key-type-subdir", default="community",
choices=["community", "none", "dbgkey"],
help="""Output subdirectory for rimage signing key type.
Expand All @@ -364,8 +365,9 @@ def parse_args():

parser.add_argument("--use-platform-subdir", default = False,
action="store_true",
help="""Use an output subdirectory for each platform.
Otherwise, all firmware files are installed in the same staging directory by default.""")
help="""Deployment: Use an output subdirectory for each platform.
Otherwise, all firmware files are installed in the same staging directory by default. If none
is specified then firmware binary can be linked to default firmware loading path directly.""")

parser.add_argument("--no-interactive", default=False, action="store_true",
help="""Run script in non-interactive mode when user input can not be provided.
Expand Down