-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
146 lines (133 loc) · 3.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
FROM debian:12.8-slim AS testing_base_bookworm
# Vivado needs libtinfo5, at least for Artix?
RUN apt-get update && \
apt-get install -y \
git \
iverilog \
libbsd-dev \
xc3sprog \
build-essential \
yosys \
verilator \
libtinfo5 \
wget \
iputils-ping \
iproute2 \
bsdmainutils \
curl \
flake8 \
python3-pip \
python3-numpy \
python3-scipy \
python3-matplotlib \
python3-yaml \
python3-serial \
python3-setuptools-scm \
gcc-riscv64-unknown-elf \
picolibc-riscv64-unknown-elf \
cmake \
flex \
bison \
libftdi1-dev \
libusb-dev \
openocd \
pkg-config && \
rm -rf /var/lib/apt/lists/* && \
python3 -c "import numpy; print('LRD Test %f' % numpy.pi)" && \
pip3 --version
# Note that flex, bison, and iverilog (above) required for building vhd2vl.
# gcc-riscv64-unknown-elf above replace our previous
# approach, used in Buster, of building from source
# Allow pip to install packages
RUN mkdir -p $HOME/.config/pip && \
printf "[global]\nbreak-system-packages = true\n" > \
$HOME/.config/pip/pip.conf && \
cat $HOME/.config/pip/pip.conf
# vhd2vl
RUN git clone https://github.com/ldoolitt/vhd2vl && \
cd vhd2vl && \
git checkout bbe3198c435a4a6325bdd08b7b43a47b6dacf5de && \
make && \
install src/vhd2vl /usr/local/bin && \
cd .. && \
rm -rf vhd2vl
# Yosys and Verilator are no longer built from source, just included
# in apt-get list above. Tested good in Debian Bookworm.
# Because we are running inside docker, installing
# python packages system wide should be ok
RUN pip3 install \
nmigen==0.2
# SymbiYosys formal verification tool + Yices 2 solver (`sby` command)
RUN apt-get update && \
apt-get install -y \
build-essential \
clang \
bison \
flex \
libreadline-dev \
tcl-dev \
libffi-dev \
git \
graphviz \
xdot \
pkg-config \
python3 \
libftdi-dev \
gperf \
libboost-program-options-dev \
autoconf \
libgmp-dev \
cmake && \
rm -rf /var/lib/apt/lists/* && \
git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys && \
cd SymbiYosys && \
git checkout 091222b87febb10fad87fcbe98a57599a54c5fd3 && \
make install && \
cd .. && \
git clone https://github.com/SRI-CSL/yices2.git yices2 && \
cd yices2 && \
autoconf && \
./configure && \
make -j$(nproc) && \
make install
# Add some configuration for Vivado here, so we don't break the cache
RUN apt-get update && \
apt-get install -y \
x11-utils \
xvfb \
locales && \
rm -rf /var/lib/apt/lists/* && \
locale -a && \
cat /etc/locale.gen && \
localedef -i en_US -f UTF-8 en_US.UTF-8
# Shady stuff to make cmake work with libidn12
RUN apt-get update && \
apt-get install -y \
libidn12 && \
rm -rf /var/lib/apt/lists/* && \
ln -s libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11
# Install litex
RUN apt-get update && \
apt-get install -y \
ninja-build \
gcc-aarch64-linux-gnu \
ghdl && \
rm -rf /var/lib/apt/lists/* && \
pip3 install \
meson
COPY build-tools/litex_meta.sh /
ENV LITEX_INSTALL_PATH=/litex
RUN mkdir ${LITEX_INSTALL_PATH} && \
cd ${LITEX_INSTALL_PATH} && \
sh /litex_meta.sh
# Install sv2v
RUN apt-get update && \
apt-get install -y \
haskell-stack && \
rm -rf /var/lib/apt/lists/* && \
git clone https://github.com/zachjs/sv2v /sv2v && \
cd /sv2v && \
git checkout 7808819c48c167978aeb5ef34c6e5ed416e90875 && \
make && \
rm -rf $HOME/.stack && \
cp bin/sv2v /usr/local/bin/