3 if [ "$EUID" -eq 0 ]; then
4 echo "Please run as a normal user!"
5 echo "This script is NOT intended to run as root."
9 echo "Current USER=$USER"
11 # Install apt dependencies
12 echo Installing necessary apt dependencies
in the chroot
13 sudo apt-get update
-y
14 sudo apt-get upgrade
-y
15 sudo apt-get
install -y automake binutils-dev bison build-essential \
16 sysvinit-utils sysvinit-core \
17 ccache clang cmake doxygen dvipng flex gcc git graphviz \
18 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
19 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
20 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
21 python2.7 python2.7
-dev \
22 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
23 python3-setuptools python-dev python-qt4 python-sphinx \
24 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
25 texlive texlive-fonts-extra texlive-lang-french \
26 texlive-latex-extra texlive-pictures xfig zlib1g-dev
28 # Add convenience variable to chroot user .bash_profile
29 vars_for_bash_profile
="export PATH=/usr/lib/ccache:\044PATH
31 export ALLIANCE_TOP=/home/$USER/alliance/install
32 export YOSYS_TOP=/home/$USER/yosys
33 export LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib:\044{LD_LIBRARY_PATH}
34 export LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib64:\044{LD_LIBRARY_PATH}"
36 echo -e "$vars_for_bash_profile" > /home
/$USER/.bash_profile
38 echo "Setting /home/$USER/.bash_profile file to (for faster rebuilds):
39 $vars_for_bash_profile"
41 sudo chown
$USER /home
/$USER/.bash_profile
42 sudo chgrp
$USER /home
/$USER/.bash_profile
44 # Build and install yosys from source
45 # note that a specific version of yosys is needed for ls180 at the moment
46 echo "deb-src http://ftp.debian.org/debian buster main" > /etc
/apt
/sources.list.d
/bustersrc.list
47 sudo apt-get update
-y
48 sudo apt-get build-dep yosys
-y
51 git clone https
://github.com
/cliffordwolf
/yosys.git
53 git checkout
049e3abf9baf795e69b9ecb9c4f19de6131f8418
55 # WAY too heavy a load (18+) - make -j$(nproc)
61 # Install coriolis2 from source
64 mkdir
-p /home
/$USER/coriolis-2.x
/src
65 cd /home
/$USER/coriolis-2.x
/src
66 git clone https
://gitlab.lip6.fr
/vlsi-eda
/coriolis.git
68 # check out Libre-SOC 180nm ASIC version
70 git checkout LS180_RC7_FINAL
71 # guaranteed to fail ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
72 .
/bootstrap
/ccb.py
--project=coriolis
--make="-j1 install"
74 # Setup and test coriolisenv
75 /home
/$USER/coriolis-2.x
/src
/coriolis
/bootstrap
/coriolisEnv.py
> /home
/$USER/coriolisenv
76 source /home
/$USER/.bash_profile
77 source /home
/$USER/coriolisenv
79 # Install alliance from source
82 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance.git
83 mkdir
-p /home
/$USER/alliance
/build
/home
/$USER/alliance
/install
84 mv alliance
/alliance
/src alliance
85 rm -rf alliance
/alliance
88 cd /home
/$USER/alliance
/build
89 ..
/src
/configure
--prefix=/home
/$USER/alliance
/install --enable-alc-shared
91 cd /home
/$USER/alliance
/build
92 source /home
/$USER/coriolisenv
93 #make and install locally as local user
96 # Install and configure alliance-check-toolkit
98 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance-check-toolkit.git
100 touch alliance-check-toolkit
/etc
/mk
/users.d
/user-
$USER.mk
101 cat <<EOG >>alliance-check-toolkit/etc/mk/users.d/user-$USER.mk
102 export CORIOLIS_TOP=/home/$USER/coriolis-2.x/Linux.x86_64/Release.Shared/install
103 export ALLIANCE_TOP=/home/$USER/alliance/install
104 export CHECK_TOOLKIT=/home/$USER/alliance-check-toolkit
105 export YOSYS_TOP=/home/$USER/yosys
107 source /home
/$USER/.bash_profile
108 cd alliance-check-toolkit
/benchs
/adder
/cmos
111 \e[1;91mSelect File -> Open Cell or press CTRL + o then enter as the cell name 'arm_chip_cts_r' without the single quotation marks.\e[0m
116 sudo chown
-R $USER *
117 sudo chgrp
-R $USER *