3 then echo "Please run as root using 'sudo bash'"
7 #!!! buster backports is needed for cmake
8 cat << EOF > /etc/apt/sources.list.d/buster_backports.list
9 deb http://deb.debian.org/debian buster-backports main
12 # oooo annoying, pin preferences for buster-backports
13 cat << EOF > /etc/apt/preferences.d/99buster-backports
15 Pin: release a=buster-backports
19 # upgrade to buster-backports
23 # change into $SUDO_USER home directory
25 mkdir
-p src
/nextpnr-xilinx
28 apt-get
install -y --allow-downgrades libcurl3-gnutls
/buster git
/buster git-man
/buster
30 git clone https
://github.com
/YosysHQ
/yosys.git
31 git clone https
://github.com
/YosysHQ
/abc.git
32 git clone https
://github.com
/f4pga
/prjxray.git
33 git clone https
://github.com
/SymbiFlow
/prjxray-db.git
34 git clone https
://github.com
/gatecat
/nextpnr-xilinx.git
36 ## Steps to compile Yosys
38 ### Necessary software to install
40 apt-get
install -y build-essential
make g
++ cmake bison flex python3 \
41 clang libreadline-dev gawk tcl-dev libffi-dev pkg-config zlib1g-dev \
42 libboost-system-dev libboost-python-dev libboost-filesystem-dev
47 git checkout
00b674d5b3ccefc7f2abcbf5b650fc14298ac549
49 git checkout
6318db6152d053244adb316fda6e01a32a4f3c72
51 make -j $
(nproc
) PREFIX
=/usr
/local
/nextpnr-xilinx
52 make PREFIX
=/usr
/local
/nextpnr-xilinx
install
53 export PATH
=/usr
/local
/nextpnr-xilinx
/bin
:$PATH
56 ## Steps to compile prjxray
58 ### Necessary software to install
60 apt-get
install -y python3-pip
65 git checkout
18b92012afe2b03f3f975a78c4372c74b60dca0c
66 git submodule update
--init --recursive
68 cmake
-DCMAKE_INSTALL_PREFIX=/usr
/local
/nextpnr-xilinx ..
71 install -d -m 0755 /usr
/local
/nextpnr-xilinx
/build
/tools
72 install -m 0755 tools
/{bitread
,bittool
,frame_address_decoder
,gen_part_base_yaml
,segmatch
,xc7frames2bit
,xc7patch
} \
73 /usr
/local
/nextpnr-xilinx
/build
/tools
75 cp -dpr utils
/usr
/local
/nextpnr-xilinx
76 sed -i -e '/^# Vivado /,$d' /usr
/local
/nextpnr-xilinx
/utils
/environment.sh
80 ## Steps to compile prjxray-db
82 ### Install prjxray-db
85 git archive
--format=tar --prefix=database
/ \
86 0a0addedd73e7e4139d52a6d8db4258763e0f1f3 | \
87 tar -C /usr
/local
/nextpnr-xilinx
-xf -
90 ## Steps to compile nextpnr-xilinx
92 ### Necessary software to install
94 apt-get
install -y libboost-thread-dev libboost-iostreams-dev \
95 libboost-program-options-dev libeigen3-dev
97 ### Build nextpnr-xilinx
100 git checkout
565588a69ea95a52f7c7592f4ed81d9bef6cfb60
103 cmake
-DARCH=xilinx
-DBUILD_GUI=OFF \
104 -DCMAKE_INSTALL_PREFIX=/usr
/local
/nextpnr-xilinx .
107 ln -s xc7a100tcsg324-1 xilinx
/external
/prjxray-db
/artix
7/xc7a100t
108 python3 xilinx
/python
/bbaexport.py
--device xc7a100tcsg324-1 \
109 --bba xilinx
/xc7a100t.bba
110 .
/bbasm
--l xilinx
/xc7a100t.bba xilinx
/xc7a100t.bin
111 install -d -m 0755 /usr
/local
/nextpnr-xilinx
/share
/xilinx
112 install -m 0755 xilinx
/xc7a100t.bin
/usr
/local
/nextpnr-xilinx
/share
/xilinx
113 export XRAY_DIR
=/usr
/local
/nextpnr-xilinx
116 cd /home
/$SUDO_USER/src
/nextpnr-xilinx
117 chown
-R $SUDO_USER .
118 chgrp
-R $SUDO_USER .