orfs.sh
17 lignes · 878 octets
#!/usr/bin/env bash # Run the OpenROAD flow scripts (ORFS) on a design config, inside the # openroad/orfs container (x86_64 image; on arm64 hosts it runs through # Rosetta or qemu). Results, logs and reports land in <work dir>. # # flows/orfs.sh build/spike/orfs/config.mk build/spike/orfs/work [make targets...] # # The repository is mounted at the same absolute path inside the container. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" CONFIG="$(realpath "${1:?design config.mk}")"; WORK="$(realpath -m "${2:?work dir}")"; shift 2 mkdir -p "$WORK" IMAGE="${ORFS_IMAGE:-openroad/orfs:latest}" exec docker run --rm --platform linux/amd64 \ --user "$(id -u):$(id -g)" -e HOME=/tmp \ -v "$ROOT:$ROOT" -w /OpenROAD-flow-scripts/flow \ "$IMAGE" bash -c "source ../env.sh >/dev/null 2>&1 || true; make DESIGN_CONFIG='$CONFIG' WORK_HOME='$WORK' $*"
GitRust