Skip to content

Commit f74e2eb

Browse files
committed
source vivado in container for aws sdk setup
1 parent 4473e02 commit f74e2eb

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/scripts/firesim-manager-entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ PUBLIC_KEY_PATH="${FIRESIM_PUBLIC_KEY_PATH:-/root/firesim-public}"
1111
EC2_SETUP_SCRIPT="${FIRESIM_EC2_SETUP_SCRIPT:-${CY_DIR}/scripts/firesim-ec2-setup.sh}"
1212
BUILD_RECIPES="${FIRESIM_BUILD_RECIPES:-${CY_DIR}/sims/firesim-staging/sample_config_build_recipes.yaml}"
1313
BUILD_CONFIG="${FIRESIM_BUILD_CONFIG:-${CY_DIR}/.github/firesim-bitstream-templates/f2/config_build.yaml}"
14+
VIVADO_VERSION="${VIVADO_VERSION:-}"
15+
16+
if [ -n "${VIVADO_VERSION}" ]; then
17+
VIVADO_PATH="/opt/Xilinx/${VIVADO_VERSION}/Vivado/settings64.sh"
18+
else
19+
VIVADO_PATH="$(find /opt/Xilinx -path '*/Vivado/settings64.sh' -type f 2>/dev/null | sort -V | tail -n 1)"
20+
fi
21+
22+
if [ ! -f "${VIVADO_PATH}" ]; then
23+
echo "Missing Vivado settings script. Set VIVADO_VERSION or mount /opt/Xilinx into the container." >&2
24+
exit 1
25+
fi
26+
27+
# shellcheck disable=SC1090
28+
source "${VIVADO_PATH}"
1429

1530
if [ ! -s "${PUBLIC_KEY_PATH}" ]; then
1631
echo "Missing public key mounted at ${PUBLIC_KEY_PATH}." >&2

.github/scripts/launch-firesim-manager.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ docker_args=(
493493
-v "${HOME}/firesim.pem:/root/firesim.pem:ro"
494494
-v "${HOME}/firesim-public:/root/firesim-public:ro"
495495
-v "${HOME}/firesim-manager-entrypoint.sh:/root/firesim-manager-entrypoint.sh:ro"
496+
-v "/opt/Xilinx:/opt/Xilinx:ro"
496497
)
497498
498499
if [ "${DETACH_CONTAINER}" = "1" ]; then

0 commit comments

Comments
 (0)