diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 9e940ef858..ce71b18133 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -20,7 +20,10 @@ _versionCompare() { } _installORDependencies() { - ./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS} + if [[ ${YOSYS_VER} == "" ]]; then + YOSYS_VER=v$(grep 'yosys_ver =' tools/yosys/docs/source/conf.py | awk -F'"' '{print $2}') + fi + ./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS} -yosys-ver="${YOSYS_VER}" } _installPipCommon() { @@ -306,6 +309,10 @@ Usage: $0 [-all|-base|-common] [-] # sudo or with root access. $0 -ci # Installs CI tools + $0 -yosys-ver=VERSION + # Installs specified version of Yosys. + # By default, the Yosys version is + # obtained from tools/yosys/docs/source/conf.py $0 -constant-build-dir # Use constant build directory, instead of # random one. @@ -315,6 +322,7 @@ EOF # default args OR_INSTALLER_ARGS="-eqy" +YOSYS_VER="" # default prefix PREFIX="" # default option @@ -355,6 +363,9 @@ while [ "$#" -gt 0 ]; do CI="yes" OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -save-deps-prefixes=/etc/openroad_deps_prefixes.txt" ;; + -yosys-ver=*) + YOSYS_VER=${1#*=} + ;; -prefix=*) OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1" PREFIX=${1#*=} diff --git a/etc/DockerHelper.sh b/etc/DockerHelper.sh index 046128696e..1eb0acca56 100755 --- a/etc/DockerHelper.sh +++ b/etc/DockerHelper.sh @@ -73,7 +73,10 @@ _setup() { fromImage="${FROM_IMAGE_OVERRIDE:-$osBaseImage}" cp tools/OpenROAD/etc/DependencyInstaller.sh etc/InstallerOpenROAD.sh context="etc" - buildArgs="--build-arg options=${options} ${noConstantBuildDir}" + local yosys_ver + yosys_ver=v$(grep 'yosys_ver =' tools/yosys/docs/source/conf.py | awk -F'"' '{print $2}') + options+=" -yosys-ver=${yosys_ver}" + buildArgs="--build-arg \"options=${options}\" ${noConstantBuildDir}" ;; *) echo "Target ${target} not found" >&2 @@ -87,20 +90,20 @@ _setup() { _create() { echo "Create docker image ${imagePath} using ${file}" - ${DOCKER_CMD} buildx build \ + eval ${DOCKER_CMD} buildx build \ --file "${file}" \ --tag "${imagePath}" \ - ${buildArgs} \ + "${buildArgs}" \ "${context}" rm -f etc/InstallerOpenROAD.sh } _push() { - if [[ -z ${username+x} ]]; then + if [[ -z ${username+x} ]] && [[ ${dryRun} != 1 ]]; then echo "Missing required -username= argument" _help fi - if [[ -z ${password+x} ]]; then + if [[ -z ${password+x} ]] && [[ ${dryRun} != 1 ]]; then echo "Missing required -password= argument" _help fi diff --git a/tools/OpenROAD b/tools/OpenROAD index 6975124cf2..84ab1533a0 160000 --- a/tools/OpenROAD +++ b/tools/OpenROAD @@ -1 +1 @@ -Subproject commit 6975124cf258e3be0db86bd2e59246b7f0e9f0c7 +Subproject commit 84ab1533a0ac76d492e2a0e246d2e77e1e358873