Reorder installs, now compiling yosys from source before
[dev-env-setup.git] / coriolis2-chroot
index e1d72a19e211cde661c713e845713ad26d270c9d..4aa005f8139a7596028e99c5fc5926cd7900beb0 100755 (executable)
@@ -26,13 +26,15 @@ echo Installing necessary apt dependencies in the chroot
 apt-get update -y
 apt-get upgrade -y
 apt-get install -y automake binutils-dev bison build-essential \
-ccache cmake doxygen dvipng flex gcc git graphviz imagemagick \
-libboost-all-dev libboost-python-dev libbz2-dev libmotif-dev \
-libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev libxpm-dev \
-libxt-dev python3.7 python3-jinja2 python3-pip python3-setuptools \
-python-dev python-qt4 python-sphinx qt4-dev-tools rapidjson-dev \
-texlive texlive-fonts-extra texlive-lang-french texlive-latex-extra \
-texlive-pictures xfig yosys zlib1g-dev
+ccache clang cmake doxygen dvipng flex gcc git graphviz \
+imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
+libmotif-dev libreadline-dev libqwt-dev libtool libx11-dev \
+libxaw7-dev libxml2-dev libxpm-dev libxt-dev python3.7 \
+python3-jinja2 python3-pip python3-setuptools python-dev \
+python-qt4 python-sphinx qt4-dev-tools rapidjson-dev tcl \
+tcl-tclreadline tcl -dev texlive texlive-fonts-extra \
+texlive-lang-french texlive-latex-extra texlive-pictures \
+xfig yosys zlib1g-dev
 
 
 
@@ -68,6 +70,24 @@ groups=sbuild-security,$MYNAME,users
 This enables you to chroot into coriolis as an unprivileged user by running
 'schroot -c coriolis /bin/bash'
 "
+
+chroot /opt/chroot/coriolis /bin/bash << EOF
+apt-get update -y 
+apt-get build-dep yosys -y
+apt-get remove yosys -y
+EOF
+runuser $MYNAME --preserve-environment -c 'schroot -c coriolis /bin/bash << EOF
+cd $CHU_HOME
+git clone https://github.com/cliffordwolf/yosys.git
+cd yosys
+make config-clang
+make -j$(nproc)
+EOF'
+chroot /opt/chroot/coriolis /bin/bash << EOF
+cd $CHU_HOME/yosys
+make install
+EOF
+
 runuser $MYNAME --preserve-environment -c 'schroot -c coriolis /bin/bash << EOF
 cd $CHU_HOME
 mkdir -p $CHU_HOME/alliance/build $CHU_HOME/alliance/install
@@ -96,33 +116,15 @@ cd $CHU_HOME/coriolis-2.x/src
 git clone https://gitlab.lip6.fr/vlsi-eda/coriolis.git
 cd coriolis
 git checkout devel
-./bootstrap/ccb.py --project=coriolis --make="-j4 install"
+./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
 
 #ln -s $CHU_HOME/coriolis-2.x/Linux.x86_64/Release.Shared/install/lib64 $CHU_HOME/coriolis-2.x/Linux.x86_64/Release.Shared/install/lib
-#./bootstrap/ccb.py --project=coriolis --make="-j4 install"
+#./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
 
 $CHU_HOME/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py > $CHU_HOME/coriolisenv
+source $CHU_HOME/.bash_profile
 source $CHU_HOME/coriolisenv
 cd ~/coriolis-2.x/Linux.x86_64/Release.Shared/install/bin
 ./cgt
 EOF'
 
-
-
-#chroot /opt/chroot/coriolis /bin/bash << EOF
-#apt-get update -y 
-#apt-get build-dep yosys -y
-#apt-get install clang tcl tcl-tclreadline tcl-dev libreadline-dev -y
-#apt-get remove yosys -y
-#EOF
-#runuser $MYNAME --preserve-environment -c 'schroot -c coriolis /bin/bash << EOF
-#cd $CHU_HOME
-#git clone https://github.com/cliffordwolf/yosys.git
-#cd yosys
-#make config-clang
-#make -j4
-#EOF'
-#chroot /opt/chroot/coriolis /bin/bash << EOF
-#cd $CHU_HOME/yosys
-#make install
-#EOF