Merge branch 'develop' of github.com:broccolimicro/bcli into develop
This commit is contained in:
commit
889342bb9e
48
Dockerfile
48
Dockerfile
@ -41,15 +41,15 @@ RUN mkdir /opt/trilinos
|
||||
WORKDIR build
|
||||
RUN cmake \
|
||||
-D PYTHON_EXECUTABLE=/usr/bin/python3 \
|
||||
-D CMAKE_C_COMPILER=mpicc \
|
||||
-D CMAKE_CXX_COMPILER=mpic++ \
|
||||
-D CMAKE_Fortran_COMPILER=mpif77 \
|
||||
-D CMAKE_INSTALL_PREFIX="/opt/trilinos" \
|
||||
-D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \
|
||||
-D AMD_LIBRARY_DIRS="/usr/lib" \
|
||||
-D MPI_BASE_DIR="/usr" \
|
||||
-C /toolsrc/Xyce/cmake/trilinos/trilinos-MPI-base.cmake \
|
||||
/toolsrc/Trilinos
|
||||
-D CMAKE_C_COMPILER=mpicc \
|
||||
-D CMAKE_CXX_COMPILER=mpic++ \
|
||||
-D CMAKE_Fortran_COMPILER=mpif77 \
|
||||
-D CMAKE_INSTALL_PREFIX="/opt/trilinos" \
|
||||
-D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \
|
||||
-D AMD_LIBRARY_DIRS="/usr/lib" \
|
||||
-D MPI_BASE_DIR="/usr" \
|
||||
-C /toolsrc/Xyce/cmake/trilinos/trilinos-MPI-base.cmake \
|
||||
/toolsrc/Trilinos
|
||||
RUN cmake --build . -j 40 -t install
|
||||
|
||||
# install Xyce
|
||||
@ -58,9 +58,9 @@ WORKDIR Xyce
|
||||
RUN mkdir build
|
||||
WORKDIR build
|
||||
RUN cmake \
|
||||
-D CMAKE_INSTALL_PREFIX=/opt/cad \
|
||||
-D Trilinos_ROOT=/opt/trilinos \
|
||||
/toolsrc/Xyce
|
||||
-D CMAKE_INSTALL_PREFIX=/opt/cad \
|
||||
-D Trilinos_ROOT=/opt/trilinos \
|
||||
/toolsrc/Xyce
|
||||
RUN cmake --build . -j 16 -t install
|
||||
RUN make xycecinterface
|
||||
RUN make install
|
||||
@ -230,18 +230,18 @@ ENV MEMBERS ""
|
||||
|
||||
RUN echo "version: 17"
|
||||
CMD exec /bin/bash -c "echo \"127.0.0.1 bcli-$USER\" >> /etc/hosts; \
|
||||
echo \"$MEMBERS\" | sed 's/[0-9]* \\(adm\|cdrom\|sudo\|dip\|plugdev\|lxd\|docker\|dialout\|sambashare\|lpadmin\\) \?//g' | sed 's/ /\n/g' | xargs -n 2 /usr/sbin/groupadd -g; \
|
||||
/usr/sbin/useradd -u $USER_ID -g $USER $USER; \
|
||||
echo \"$MEMBERS\" | sed 's/[0-9]* \\(adm\|cdrom\|sudo\|dip\|plugdev\|lxd\|docker\|dialout\|sambashare\\) \?//g' | sed 's/ [0-9]\+ /,/g' | sed 's/[0-9]\+ //g' | xargs -I{} /usr/sbin/usermod -aG {} $USER; \
|
||||
cp -r /template /home/$USER; \
|
||||
chown -R $USER:$USER /home/$USER; \
|
||||
echo \"$USER ALL=NOPASSWD: /usr/bin/apt-get install *\" > /etc/sudoers.d/apt-get; \
|
||||
echo \"$USER ALL=NOPASSWD: /usr/bin/apt install *\" > /etc/sudoers.d/apt; \
|
||||
ln -s /host/.ssh /home/$USER/.ssh; \
|
||||
awk '/\[user\]/,/\[[^u]/' /host/.gitconfig | head -n -1 > /home/$USER/gitconfig; \
|
||||
cat /home/$USER/.gitconfig >> /home/$USER/gitconfig; \
|
||||
mv /home/$USER/gitconfig /home/$USER/.gitconfig; \
|
||||
trap : TERM INT; sleep infinity & wait"
|
||||
echo \"$MEMBERS\" | sed 's/[0-9]* \\(adm\|cdrom\|sudo\|dip\|plugdev\|lxd\|docker\|dialout\|sambashare\|lpadmin\\) \?//g' | sed 's/ /\n/g' | xargs -n 2 /usr/sbin/groupadd -g; \
|
||||
/usr/sbin/useradd -u $USER_ID -g $USER $USER; \
|
||||
echo \"$MEMBERS\" | sed 's/[0-9]* \\(adm\|cdrom\|sudo\|dip\|plugdev\|lxd\|docker\|dialout\|sambashare\\) \?//g' | sed 's/ [0-9]\+ /,/g' | sed 's/[0-9]\+ //g' | xargs -I{} /usr/sbin/usermod -aG {} $USER; \
|
||||
cp -r /template /home/$USER; \
|
||||
chown -R $USER:$USER /home/$USER; \
|
||||
echo \"$USER ALL=NOPASSWD: /usr/bin/apt-get install *\" > /etc/sudoers.d/apt-get; \
|
||||
echo \"$USER ALL=NOPASSWD: /usr/bin/apt install *\" > /etc/sudoers.d/apt; \
|
||||
ln -s /host/.ssh /home/$USER/.ssh; \
|
||||
awk '/\[user\]/,/\[[^u]/' /host/.gitconfig | head -n -1 > /home/$USER/gitconfig; \
|
||||
cat /home/$USER/.gitconfig >> /home/$USER/gitconfig; \
|
||||
mv /home/$USER/gitconfig /home/$USER/.gitconfig; \
|
||||
trap : TERM INT; sleep infinity & wait"
|
||||
|
||||
|
||||
# In case we need to add a password for sudo.
|
||||
|
@ -23,7 +23,7 @@ bcli() {
|
||||
umount $HOME/tech
|
||||
fi
|
||||
rmdir $HOME/tech
|
||||
elif [ "$#" -eq 0 ]; then
|
||||
elif [ "$#" -eq 0 ]; then
|
||||
WD="/host"
|
||||
if [[ "$PWD" = "$HOME/"* ]]; then
|
||||
WD="/host${PWD#$HOME}"
|
||||
|
164
ubuntu/build.sh
Normal file
164
ubuntu/build.sh
Normal file
@ -0,0 +1,164 @@
|
||||
#!/bin/bash
|
||||
# Ubuntu 22
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}";
|
||||
pushd `dirname ${SCRIPT_PATH}` > /dev/null
|
||||
SCRIPT_PATH=`pwd -P`;
|
||||
popd > /dev/null
|
||||
|
||||
mkdir $SCRIPT_PATH/toolsrc
|
||||
mkdir $SCRIPT_PATH/cad
|
||||
|
||||
# Xyce and Trilinos takes the longest to execute, in the interest of caching, this should go first.
|
||||
# install Trilinos
|
||||
apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
wget gcc g++ gfortran make bison flex libfl-dev libfftw3-dev libsuitesparse-dev libblas-dev liblapack-dev libtool \
|
||||
autoconf automake git \
|
||||
libhwloc15 libopenmpi-dev openmpi-bin openmpi-common \
|
||||
python3 pip
|
||||
apt-get remove -y cmake; pip install cmake --upgrade
|
||||
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone --depth=1 https://github.com/trilinos/Trilinos.git --branch trilinos-release-15-1-1
|
||||
git clone --depth=1 https://github.com/Xyce/Xyce.git --branch Release-7.8.0
|
||||
|
||||
cd Trilinos
|
||||
mkdir $SCRIPT_PATH/trilinos
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-D PYTHON_EXECUTABLE=/usr/bin/python3 \
|
||||
-D CMAKE_C_COMPILER=mpicc \
|
||||
-D CMAKE_CXX_COMPILER=mpic++ \
|
||||
-D CMAKE_Fortran_COMPILER=mpif77 \
|
||||
-D CMAKE_INSTALL_PREFIX="$SCRIPT_PATH/trilinos" \
|
||||
-D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \
|
||||
-D AMD_LIBRARY_DIRS="/usr/lib" \
|
||||
-D MPI_BASE_DIR="/usr" \
|
||||
-C $SCRIPT_PATH/toolsrc/Xyce/cmake/trilinos/trilinos-MPI-base.cmake \
|
||||
$SCRIPT_PATH/toolsrc/Trilinos
|
||||
cmake --build . -j 40 -t install
|
||||
|
||||
# install Xyce
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
cd Xyce
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-D CMAKE_INSTALL_PREFIX=$SCRIPT_PATH/cad \
|
||||
-D Trilinos_ROOT=$SCRIPT_PATH/trilinos \
|
||||
$SCRIPT_PATH/toolsrc/Xyce
|
||||
cmake --build . -j 16 -t install
|
||||
make xycecinterface
|
||||
make install
|
||||
|
||||
# install OpenRoad
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone --recursive https://www.github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git
|
||||
cd OpenROAD-flow-scripts
|
||||
apt-get install -y sudo libpython3.11
|
||||
SUDO_USER="root" ./setup.sh
|
||||
./build_openroad.sh --local --install-path $SCRIPT_PATH/openroad --nice
|
||||
mv dependencies $SCRIPT_PATH/or-tools
|
||||
|
||||
# install ACT
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
apt-get install -y libedit-dev zlib1g-dev m4 git gcc g++ make libboost-all-dev
|
||||
git --recursive clone https://www.github.com/asyncvlsi/actflow.git
|
||||
cd actflow
|
||||
export ACT_HOME=$SCRIPT_PATH/cad
|
||||
export VLSI_TOOLS_SRC=$SCRIPT_PATH/toolsrc/actflow
|
||||
cd actsim
|
||||
./grab_xyce.sh $SCRIPT_PATH/toolsrc/Xyce/build
|
||||
sed -i 's/make/make CXX=mpic++ CC=mpicc CC_COMPILER=mpicc CXX_COMPILER=mpic++ C_COMPILER_NAME=mpicc CXX_COMPILER_NAME=mpic++/g' build.sh
|
||||
cd $SCRIPT_PATH/toolsrc/actflow
|
||||
echo "g++" > CXX_COMPILER
|
||||
CXX="g++" CC="gcc" CXX_COMPILER="g++" CC_COMPILER="gcc" ./build
|
||||
# ./build
|
||||
|
||||
# install ACT-06
|
||||
apt-get install -y libedit-dev zlib1g-dev m4 git gcc g++ make
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
--mount=type=secret,id=user --mount=type=secret,id=token git clone https://$(cat /run/secrets/user):$(cat /run/secrets/token)@git.broccolimicro.io/Broccoli/act-06.git --branch v1.0.1
|
||||
cd act-06/prsim
|
||||
./grab_xyce.sh $SCRIPT_PATH/toolsrc/Xyce/build
|
||||
cd ..
|
||||
XYCE_INSTALL="$SCRIPT_PATH/cad" ENABLE_MPI=1 make
|
||||
cp prsim/prsim chan.py measure.py sim2vcd.py tlint/tlint spi2act/spi2act.py v2act/v2act $SCRIPT_PATH/cad/bin
|
||||
|
||||
# install graphviz DOT
|
||||
apt-get install -y graphviz
|
||||
|
||||
# install Haystack
|
||||
echo "building haystack"
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone --recursive https://github.com/nbingham1/haystack.git --branch v0.1.2
|
||||
cd haystack
|
||||
cd lib
|
||||
make
|
||||
cd ../bin
|
||||
make
|
||||
cp hsesim/hsesim $SCRIPT_PATH/cad/bin
|
||||
cp hseenc/hseenc $SCRIPT_PATH/cad/bin
|
||||
cp hseplot/plot $SCRIPT_PATH/cad/bin
|
||||
cp bubble/bubble $SCRIPT_PATH/cad/bin
|
||||
cp prsim/prsim $SCRIPT_PATH/cad/bin/prsimh # don't overwrite act's prsim
|
||||
cp gated/gated $SCRIPT_PATH/cad/bin
|
||||
cp prsize/size $SCRIPT_PATH/cad/bin
|
||||
|
||||
# install go
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
apt-get -y install wget
|
||||
/usr/bin/wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz
|
||||
tar -C $SCRIPT_PATH -xzf go1.19.1.linux-amd64.tar.gz
|
||||
GOPATH=$SCRIPT_PATH/go $SCRIPT_PATH/go/bin/go install golang.org/x/tools/gopls@latest
|
||||
GOPATH=$SCRIPT_PATH/go $SCRIPT_PATH/go/bin/go install golang.org/x/lint/golint@latest
|
||||
|
||||
# install gaw
|
||||
apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y libgtk-3-dev libcanberra-gtk3-module
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone https://git.broccolimicro.io/Broccoli/waveview.git
|
||||
cd waveview
|
||||
./configure --prefix=$SCRIPT_PATH/cad
|
||||
make
|
||||
make install
|
||||
|
||||
# install gtkwave
|
||||
apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y gtkwave
|
||||
|
||||
# install prspice
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone https://github.com/nbingham1/prspice.git --branch v0.0.2
|
||||
cd prspice
|
||||
make
|
||||
cp prdbase prspice $SCRIPT_PATH/cad/bin
|
||||
|
||||
# install pr
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone https://github.com/broccolimicro/pr.git --branch v0.0.6
|
||||
cp pr/pr pr/scripts/* $SCRIPT_PATH/cad/bin
|
||||
|
||||
# install magic layout tool
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y tcsh m4 csh libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev libncurses-dev
|
||||
git clone https://www.github.com/RTimothyEdwards/magic.git
|
||||
cd magic
|
||||
./configure --prefix=$SCRIPT_PATH/magic
|
||||
make
|
||||
make install
|
||||
|
||||
ADD ../share/* $SCRIPT_PATH/cad/share
|
||||
|
||||
# setup python venv
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-venv
|
||||
python3 -m venv $SCRIPT_PATH/python
|
||||
source $SCRIPT_PATH/python/bin/activate
|
||||
export PATH="$SCRIPT_PATH/python/bin:$PATH"
|
||||
|
||||
# install floret
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y libqhull-dev zlib1g-dev python3.10-dev tup
|
||||
cd $SCRIPT_PATH/toolsrc
|
||||
git clone --recursive https://github.com/broccolimicro/floret.git
|
||||
cd floret
|
||||
make
|
||||
cp floret-linux $SCRIPT_PATH/cad/bin/floret
|
||||
|
Loading…
Reference in New Issue
Block a user