forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsof-qemu-run.sh
More file actions
executable file
·28 lines (20 loc) · 1.02 KB
/
sof-qemu-run.sh
File metadata and controls
executable file
·28 lines (20 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2026 Intel Corporation. All rights reserved.
# Define the build directory from the first argument (or default)
BUILD_DIR="${1:-build}"
# Find and source the zephyr environment script, typically via the sof-venv wrapper
# or directly if running in a known zephyrproject layout.
# We will use the existing helper sof-venv.sh to get the right environment.
# Get the directory of this script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOF_WORKSPACE="$(dirname "$(dirname "$SCRIPT_DIR")")"
# Use the SOF workspace to locate the virtual environment
VENV_DIR="$SOF_WORKSPACE/.venv"
echo "Using SOF environment at $SOF_WORKSPACE"
# start the virtual environment
source ${VENV_DIR}/bin/activate
# Execute the QEMU runner from within the correct build directory
cd "${BUILD_DIR}" || exit 1
# Finally run the python script which will now correctly inherit 'west' from the sourced environment.
python3 "${SCRIPT_DIR}/sof-qemu-run.py" --build-dir "${BUILD_DIR}"