2 # name of user running script
4 echo "Checking whoami for current user"
5 then SUDO_USER
=$
(whoami
)
7 echo "Current SUDO_USER=$SUDO_USER"
9 # Install apt dependencies
10 echo Installing necessary apt dependencies
in the chroot
11 sudo apt-get update
-y
12 sudo apt-get upgrade
-y
13 sudo apt-get
install -y automake binutils-dev bison build-essential \
14 sysvinit-utils sysvinit-core \
15 ccache clang cmake doxygen dvipng flex gcc git graphviz \
16 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
17 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
18 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
19 python2.7 python2.7
-dev \
20 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
21 python3-setuptools python-dev python-qt4 python-sphinx \
22 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
23 texlive texlive-fonts-extra texlive-lang-french \
24 texlive-latex-extra texlive-pictures xfig zlib1g-dev
26 # Add convenience variable to chroot user .bash_profile
27 echo -e 'export PATH=/usr/lib/ccache:"\044PATH"\nexport DISPLAY=:0.0\nexport ALLIANCE_TOP=/home/$SUDO_USER/alliance/install\nexport YOSYS_TOP=/home/$SUDO_USER/yosys\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib:\044{LD_LIBRARY_PATH}\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib64:\044{LD_LIBRARY_PATH}' > /home
/$SUDO_USER/.bash_profile
29 chown
$SUDO_USER /home
/$SUDO_USER/.bash_profile
30 chgrp
$SUDO_USER /home
/$SUDO_USER/.bash_profile
32 echo -e "Added 'export PATH=/usr/lib/ccache:\"\044PATH\"\nexport DISPLAY=:0.0' to /home/$SUDO_USER/.bash_profile to speed up rebuilds"
34 # Build and install yosys from source
35 # note that a specific version of yosys is needed for ls180 at the moment
36 echo "deb-src http://ftp.debian.org/debian buster main" > /etc
/apt
/sources.list.d
/bustersrc.list
37 sudo apt-get update
-y
38 sudo apt-get build-dep yosys
-y
41 git clone https
://github.com
/cliffordwolf
/yosys.git
43 git checkout
049e3abf9baf795e69b9ecb9c4f19de6131f8418
47 cd /home
/$SUDO_USER/yosys
50 # Install coriolis2 from source
53 mkdir
-p /home
/$SUDO_USER/coriolis-2.x
/src
54 cd /home
/$SUDO_USER/coriolis-2.x
/src
55 git clone https
://gitlab.lip6.fr
/vlsi-eda
/coriolis.git
58 .
/bootstrap
/ccb.py
--project=coriolis
--make="-j$(nproc) install"
60 # Setup and test coriolisenv
61 /home
/$SUDO_USER/coriolis-2.x
/src
/coriolis
/bootstrap
/coriolisEnv.py
> /home
/$SUDO_USER/coriolisenv
62 source /home
/$SUDO_USER/.bash_profile
63 source /home
/$SUDO_USER/coriolisenv
65 # Install alliance from source
68 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance.git
69 mkdir
-p /home
/$SUDO_USER/alliance
/build
/home
/$SUDO_USER/alliance
/install
70 mv alliance
/alliance
/src alliance
71 rm -rf alliance
/alliance
74 cd /home
/$SUDO_USER/alliance
/build
75 ..
/src
/configure
--prefix=/home
/$SUDO_USER/alliance
/install --enable-alc-shared
77 cd /home
/$SUDO_USER/alliance
/build
78 source /home
/$SUDO_USER/coriolisenv
81 # Install and configure alliance-check-toolkit
83 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance-check-toolkit.git
85 touch alliance-check-toolkit
/etc
/mk
/users.d
/user-
$SUDO_USER.mk
86 cat <<EOG >>alliance-check-toolkit/etc/mk/users.d/user-$SUDO_USER.mk
87 export CORIOLIS_TOP=/home/$SUDO_USER/coriolis-2.x/Linux.x86_64/Release.Shared/install
88 export ALLIANCE_TOP=/home/$SUDO_USER/alliance/install
89 export CHECK_TOOLKIT=/home/$SUDO_USER/alliance-check-toolkit
90 export YOSYS_TOP=/home/$SUDO_USER/yosys
92 source /home
/$SUDO_USER/.bash_profile
93 cd alliance-check-toolkit
/benchs
/ARM
/cmos
96 \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
100 cd /home
/$SUDO_USER/src
/nextpnr
101 chown
-R $SUDO_USER .
102 chgrp
-R $SUDO_USER .