Skip to content

Commit 3d9a3f7

Browse files
oharboeclaude
andcommitted
Strip //:install to developer-only MVP
Remove Ubuntu dep checking, --skip-openroad flag, and verbose help text. Docs: position Bazel as unsupported developer-only option, CMake first. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Øyvind Harboe <[email protected]>
1 parent c50a4a0 commit 3d9a3f7

2 files changed

Lines changed: 27 additions & 90 deletions

File tree

bazel/install.sh

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
11
#!/bin/bash
22
set -e
33

4-
# ORFS install script
5-
# Single user-facing entry point: bazelisk run //:install
4+
# ORFS developer install script
5+
# Builds and installs OpenROAD, Yosys, and yosys-slang to tools/install/
6+
# where flow/Makefile expects them.
67
#
7-
# Builds and installs tools to tools/install/ where flow/Makefile expects them.
88
# Uses stamp files for fast no-op re-runs (seconds when nothing changed).
99

1010
WORKSPACE="${BUILD_WORKSPACE_DIRECTORY:-.}"
1111
INSTALL_DIR="${WORKSPACE}/tools/install"
1212
NUM_THREADS=$(nproc)
1313

14+
BUILD_OPENROAD=1
15+
1416
usage() {
1517
cat <<'EOF'
1618
Usage: bazelisk run //:install [-- OPTIONS]
1719
18-
Installs tools required for the ORFS flow/Makefile.
19-
20-
Installed:
21-
openroad OpenROAD with GUI support
22-
yosys Yosys synthesis tool
23-
yosys-slang Yosys SystemVerilog plugin
24-
25-
Not yet supported (use sudo ./setup.sh):
26-
klayout KLayout layout viewer
27-
kepler Kepler formal verification
28-
29-
Nix users: nix develop already provides all tools. See flake.nix.
30-
3120
Options:
3221
--help, -h Show this help
3322
--skip-openroad Skip OpenROAD build
@@ -36,52 +25,6 @@ EOF
3625
exit 0
3726
}
3827

39-
# Check for required system dependencies before expensive builds.
40-
# ORFS checks deps for what it builds (yosys/slang). OpenROAD checks
41-
# its own deps in tools/OpenROAD/bazel/install.sh (separation of concerns).
42-
#
43-
# Currently only Ubuntu/Debian is checked. Dependency checking for
44-
# other platforms (macOS, RHEL, Fedora, etc.) is not implemented
45-
# because we cannot test them. Contributions welcome.
46-
check_ubuntu_deps() {
47-
local missing_cmds=()
48-
local missing_pkgs=()
49-
50-
# Commands needed for yosys build
51-
command -v bison &>/dev/null || { missing_cmds+=(bison); missing_pkgs+=(bison); }
52-
command -v flex &>/dev/null || { missing_cmds+=(flex); missing_pkgs+=(flex); }
53-
command -v gawk &>/dev/null || { missing_cmds+=(gawk); missing_pkgs+=(gawk); }
54-
command -v g++ &>/dev/null || { missing_cmds+=(g++); missing_pkgs+=(g++); }
55-
command -v pkg-config &>/dev/null || { missing_cmds+=(pkg-config); missing_pkgs+=(pkg-config); }
56-
command -v tclsh &>/dev/null || { missing_cmds+=(tclsh); missing_pkgs+=(tcl); }
57-
command -v git &>/dev/null || { missing_cmds+=(git); missing_pkgs+=(git); }
58-
command -v cmake &>/dev/null || { missing_cmds+=(cmake); missing_pkgs+=(cmake); }
59-
60-
# Dev libraries needed for yosys/slang compilation (check via dpkg)
61-
for pkg in tcl-dev libffi-dev libreadline-dev zlib1g-dev; do
62-
if ! dpkg -s "$pkg" &>/dev/null 2>&1; then
63-
missing_pkgs+=("$pkg")
64-
fi
65-
done
66-
67-
if [[ ${#missing_pkgs[@]} -gt 0 ]]; then
68-
echo "ERROR: Missing dependencies for Yosys build."
69-
if [[ ${#missing_cmds[@]} -gt 0 ]]; then
70-
echo " Missing commands: ${missing_cmds[*]}"
71-
fi
72-
echo ""
73-
echo "On Ubuntu this would be:"
74-
echo " sudo apt install ${missing_pkgs[*]}"
75-
exit 1
76-
fi
77-
}
78-
79-
if command -v dpkg &>/dev/null; then
80-
check_ubuntu_deps
81-
fi
82-
83-
BUILD_OPENROAD=1
84-
8528
while [[ $# -gt 0 ]]; do
8629
case "$1" in
8730
--help|-h)

docs/user/BuildLocally.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@
44

55
| Path | Prerequisites | sudo? | Best for |
66
|------|--------------|-------|----------|
7-
| **Bazel** | [Bazelisk](https://bazel.build/install/bazelisk) | No | Most users |
7+
| **CMake** | `sudo ./setup.sh` | Yes | Most users |
88
| **Nix** | [Nix](https://github.com/DeterminateSystems/nix-installer) | No | Nix users |
9-
| **CMake** | `sudo ./setup.sh` | Yes | Existing CMake developers |
9+
| **Bazel** | [Bazelisk](https://bazel.build/install/bazelisk) | No | ORFS/OpenROAD developers only, unsupported |
1010

11-
### Bazel (recommended)
11+
### CMake
1212

13-
Install [Bazelisk](https://bazel.build/install/bazelisk) following the
14-
[official instructions](https://bazel.build/install/bazelisk).
13+
The `setup.sh` script installs all of the dependencies, including OpenROAD dependencies, if they are not already installed.
14+
15+
Supported configurations are: Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04(aarch64), RHEL 8, RockyLinux 9 and Debian 11.
1516

1617
``` shell
1718
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
1819
cd OpenROAD-flow-scripts
19-
bazelisk run //:install
20-
cd flow && make
20+
sudo ./setup.sh
21+
./build_openroad.sh --local
2122
```
2223

23-
For options: `bazelisk run //:install -- --help`
24+
:::{Note}
25+
There is a `build_openroad.log` file that is generated with every
26+
build in the main directory. In case of filing issues, it can be uploaded
27+
in the "Relevant log output" section of OpenROAD-flow-scripts repo
28+
[issue form](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues/new?assignees=&labels=&template=bug_report_with_orfs.yml).
29+
:::
2430

2531
### Nix
2632

@@ -31,36 +37,24 @@ nix develop
3137
cd flow && make
3238
```
3339

34-
### CMake (existing path)
35-
36-
## Clone and Install Dependencies
40+
### Bazel
3741

38-
The `setup.sh` script installs all of the dependencies, including OpenROAD dependencies, if they are not already installed.
39-
40-
Supported configurations are: Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04(aarch64), RHEL 8, RockyLinux 9 and Debian 11.
42+
For ORFS/OpenROAD developers. Most of `./setup.sh` isn't needed when
43+
building OpenROAD with Bazel — this provides the bare minimum to build
44+
OpenROAD and test ORFS flows. No sudo required.
45+
Install [Bazelisk](https://bazel.build/install/bazelisk) first.
4146

4247
``` shell
4348
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
4449
cd OpenROAD-flow-scripts
45-
sudo ./setup.sh
46-
```
47-
48-
## Build
49-
50-
``` shell
51-
./build_openroad.sh --local
50+
bazelisk run //:install
51+
cd flow && make
5252
```
53-
:::{Note}
54-
There is a `build_openroad.log` file that is generated with every
55-
build in the main directory. In case of filing issues, it can be uploaded
56-
in the "Relevant log output" section of OpenROAD-flow-scripts repo
57-
[issue form](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues/new?assignees=&labels=&template=bug_report_with_orfs.yml).
58-
:::
5953

6054
## Verify Installation
6155

6256
The binaries should be available on your `$PATH` after setting
63-
up the environment. The `make` command runs from RTL-GDSII generation for default design `gcd` with `nangate45` PDK.
57+
up the environment. The `make` command runs from RTL-GDSII generation for default design `gcd` with `nangate45` PDK.
6458

6559
``` shell
6660
source ./env.sh

0 commit comments

Comments
 (0)