#!/bin/bash if [ "$EUID" -ne 0 ] then echo "Please run as root" exit fi apt-get update -y 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 cd /home mkdir nextpnr cd nextpnr git clone --recursive https://github.com/YosysHQ/prjtrellis git clone --recursive https://github.com/YosysHQ/nextpnr cd prjtrellis cd libtrellis cmake -DCMAKE_INSTALL_PREFIX=/usr/local/libtrellis . make make install cd ../.. cd nextpnr cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nextpnr-ecp5 \ -DARCH=ecp5 \ -DTRELLIS_INSTALL_PREFIX=/usr/local/libtrellis . make make install