1 # Installation instructions for Nextpnr-xilinx with Xilinx Artix7 100T Board
3 * <https://github.com/gatecat/nextpnr-xilinx>
7 * <https://bugs.libre-soc.org/show_bug.cgi?id=790>
11 ## Setting up new debootstrap and chroot into it
13 Run the following if you wish to isolate the symbiflow build
14 from other software (reproducible builds) or use the schroot
15 auto-preparation script here:
16 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
18 export MY_CHROOT=/stable-chroot
20 debootstrap buster $MY_CHROOT http://deb.debian.org/debian/
21 mount -t proc proc $MY_CHROOT/proc
22 mount -t sysfs sysfs $MY_CHROOT/sys
23 mount -t devpts devpts $MY_CHROOT/dev/pts/
24 chroot $MY_CHROOT /bin/bash
26 ## Add Buster Backports Repo and Update
28 ""buster backports is needed for cmake""
30 cat << EOF > /etc/apt/sources.list.d/buster_backports.list
31 deb http://deb.debian.org/debian buster-backports main
34 ""oooo annoying, pin preferences for buster-backports""
36 cat << EOF > /etc/apt/preferences.d/99buster-backports
38 Pin: release a=buster-backports
42 ""upgrade to buster-backports""
47 ## Download neccessary softwares
49 apt-get install -y libcurl3-gnutls/buster git/buster
51 git clone https://github.com/YosysHQ/yosys.git
52 git clone https://github.com/YosysHQ/abc.git
53 git clone https://github.com/f4pga/prjxray.git
54 git clone https://github.com/SymbiFlow/prjxray-db.git
55 git clone https://github.com/gatecat/nextpnr-xilinx.git
57 ## Steps to compile Yosys
59 ### Necessary software to install
61 apt-get install -y build-essential make g++ cmake bison flex python3 \
62 clang libreadline-dev gawk tcl-dev libffi-dev pkg-config zlib1g-dev \
63 libboost-system-dev libboost-python-dev libboost-filesystem-dev
68 git checkout 00b674d5b3ccefc7f2abcbf5b650fc14298ac549
70 git checkout 6318db6152d053244adb316fda6e01a32a4f3c72
72 make -j $(nproc) PREFIX=/usr/local/nx
73 make PREFIX=/usr/local/nx install
74 export PATH=/usr/local/nx/bin:$PATH
77 ## Steps to compile prjxray
79 ### Necessary software to install
81 apt-get install -y python3-pip
86 git checkout 18b92012afe2b03f3f975a78c4372c74b60dca0c
87 git submodule update --init --recursive
89 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nx ..
92 install -d -m 0755 /usr/local/nx/build/tools
93 install -m 0755 tools/{bitread,bittool,frame_address_decoder,gen_part_base_yaml,segmatch,xc7frames2bit,xc7patch} \
94 /usr/local/nx/build/tools
96 cp -dpr utils /usr/local/nx
97 sed -i -e '/^# Vivado /,$d' /usr/local/nx/utils/environment.sh
101 ## Steps to compile prjxray-db
103 ### Install prjxray-db
106 git archive --format=tar --prefix=database/ \
107 0a0addedd73e7e4139d52a6d8db4258763e0f1f3 | \
108 tar -C /usr/local/nx -xf -
111 ## Steps to compile nextpnr-xilinx
113 ### Necessary software to install
115 apt-get install -y libboost-thread-dev libboost-iostreams-dev \
116 libboost-program-options-dev libeigen3-dev
118 ### Build nextpnr-xilinx
121 git checkout 565588a69ea95a52f7c7592f4ed81d9bef6cfb60
122 cmake -DARCH=xilinx -DBUILD_GUI=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/nx .
125 python3 xilinx/python/bbaexport.py --device xc7a100tcsg324-1 \
126 --bba xilinx/xc7a100t.bba
127 ./bbasm --l xilinx/xc7a100t.bba xilinx/xc7a100t.bin
128 install -d -m 0755 /usr/local/nx/share/xilinx
129 install -m 0755 xilinx/xc7a100t.bin /usr/local/nx/share/xilinx
130 export XRAY_DIR=/usr/local/nx
132 # build attosoc example; it should build attosoc.bit as final bitstream
135 cp -dpr arty-a35 arty-a100
137 sed -i -e 's@xc7a35tcsg324-1@xc7a100tcsg324-1@g' \
138 -e 's@../../../nextpnr-xilinx@nextpnr-xilinx@g' \
139 -e 's@../../xc7a35t.bin@/usr/local/nx/share/xilinx/xc7a100t.bin@g' \
143 # see file attosoc.bit; it is the bitstream file and if built then success