Add new install script for nextpnr with ecp5 support
[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 mount -t proc proc /proc
8 mount -t sysfs sysfs /sys
9 mount -t devpts -o rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 devpts /dev/pts
10
11 apt-get update -y
12 apt-get install -y python3 python3-dev clang cmake libboost-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-iostreams-dev openocd libeigen3-dev
13
14 cd /home
15 mkdir nextpnr
16 cd nextpnr
17
18 git clone --recursive https://github.com/YosysHQ/prjtrellis
19 git clone --recursive https://github.com/YosysHQ/nextpnr
20
21 cd prjtrellis
22 cd libtrellis
23 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/libtrellis .
24 make
25 make install
26 cd ../..
27
28 cd nextpnr
29 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nextpnr-ecp5 -DARCH=ecp5 -DTRELLIS_INSTALL_PREFIX=/usr/local/libtrellis .
30 make
31 make install
32
33 umount /dev/pts
34 umount /sys
35 umount /proc
36