formatting, remove proc/sys/dev mount in case its run as non-chroot
[dev-env-setup.git] / nextpnr-ecp5-install
1 #!/bin/bash
2 if [ "$EUID" -ne 0 ]
3 then echo "Please run as root"
4 exit
5 fi
6
7 apt-get update -y
8 apt-get install -y python3 python3-dev clang cmake libboost-dev \
9 libboost-filesystem-dev libboost-thread-dev \
10 libboost-program-options-dev libboost-iostreams-dev \
11 openocd libeigen3-dev
12
13 cd /home
14 mkdir nextpnr
15 cd nextpnr
16
17 git clone --recursive https://github.com/YosysHQ/prjtrellis
18 git clone --recursive https://github.com/YosysHQ/nextpnr
19
20 cd prjtrellis
21 cd libtrellis
22 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/libtrellis .
23 make
24 make install
25 cd ../..
26
27 cd nextpnr
28 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nextpnr-ecp5 \
29 -DARCH=ecp5 \
30 -DTRELLIS_INSTALL_PREFIX=/usr/local/libtrellis .
31 make
32 make install
33