This commit is contained in:
Yannick Reiss 2025-06-24 07:19:48 +02:00
commit 4aa2107075
5 changed files with 104 additions and 0 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# Use Alpine Linux as the base image
FROM ubuntu:latest
# Install dependencies
RUN apt update && apt upgrade -y
RUN apt install -y git wget bash sudo
# Setup user
RUN useradd -m -p "" openroad
RUN usermod -aG sudo openroad
# Install scripts
COPY ./src /home/openroad
RUN chmod 777 /home/openroad/*
# Install tools
RUN /home/openroad/yosys.sh
RUN /home/openroad/openroad.sh
USER openroad
WORKDIR /home/openroad
# Setup orfs
RUN /home/openroad/orfs.sh
CMD ["bash"]

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
PROVIDER = docker
UNAME = ninachloe
IMAGE = orfs_compact
LABEL = latest
.PHONY: build
build:
$(PROVIDER) build -t $(UNAME)/$(IMAGE):$(LABEL) .
.PHONY: run
run:
$(PROVIDER) run --rm -it --hostname $(IMAGE) --name $(UNAME)_testrun $(UNAME)/$(IMAGE):$(LABEL) "/bin/bash"
.PHONY: publish
publish: build
$(PROVIDER) push $(UNAME)/$(IMAGE):$(LABEL)
$(PROVIDER) rmi $(IMAGE)

14
src/openroad.sh Executable file
View File

@ -0,0 +1,14 @@
apt install -y git bash tree
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD.git
cd OpenROAD
./etc/DependencyInstaller.sh -all
./etc/Build.sh
cd build
make install
cd ../..
rm -rf OpenROAD
echo "Searching openroad"
openroad -version
echo "Leaving openroad"

22
src/orfs.sh Executable file
View File

@ -0,0 +1,22 @@
DIRECTORY_OF_ORIGIN=$(pwd)
cd /home/openroad
git clone https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
FILES=$(find .)
echo "[INFO] Setting permissions for OpenROAD"
sudo ./setup.sh
# Remove the unused tools
rm -rf tools/yosys
rm -rf tools/OpenROAD
echo "export OPENROAD_EXE=$(command -v openroad)" > /tmp/bashrc
echo "export YOSYS_EXE=$(command -v yosys)" >> /tmp/bashrc
#echo "export PDK_ROOT=/usr/local/share/IHP-Open-PDK/ihp-sg13g2" >> /tmp/bashrc
cat /tmp/bashrc >> ~/.bashrc
cd $DIRECTORY_OF_ORIGIN

25
src/yosys.sh Executable file
View File

@ -0,0 +1,25 @@
# yosys 0.38 + 113
apt install -y build-essential clang lld bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev make cmake
git clone https://github.com/YosysHQ/yosys.git
cd yosys
git submodule update --init --recursive
make config-gcc
make
make install
# Adding the system verilog plugin
git clone --recursive https://github.com/povik/yosys-slang
cd yosys-slang
make -j$(nproc) install
cd ..
cd ..
rm -rf yosys
yosys --version