|
1 | | -FROM ubuntu:latest |
| 1 | +FROM ubuntu:latest AS build |
| 2 | + |
| 3 | +WORKDIR /root |
2 | 4 |
|
3 | 5 | RUN apt update -qq \ |
4 | 6 | && DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ |
5 | | - ### GHDL |
| 7 | + # Common |
6 | 8 | build-essential \ |
7 | 9 | ca-certificates \ |
8 | 10 | git \ |
9 | | - gnat \ |
10 | | - libgnat-12 \ |
11 | 11 | zlib1g-dev \ |
12 | | - ### Yosys |
13 | | - build-essential \ |
14 | | - ca-certificates \ |
| 12 | + # GHDL |
| 13 | + gnat \ |
| 14 | + # Yosys |
15 | 15 | clang \ |
16 | 16 | bison \ |
17 | 17 | flex \ |
18 | 18 | libreadline-dev \ |
19 | | - gawk \ |
20 | 19 | tcl-dev \ |
21 | 20 | libffi-dev \ |
22 | | - git \ |
23 | | - graphviz \ |
24 | | - xdot \ |
25 | 21 | pkg-config \ |
26 | 22 | python3 \ |
27 | | - libboost-system-dev \ |
28 | | - libboost-python-dev \ |
29 | | - libboost-filesystem-dev \ |
30 | | - zlib1g-dev \ |
31 | | - ### synlig |
32 | | - ant \ |
33 | | - bison \ |
34 | | - build-essential \ |
35 | | - cmake \ |
36 | | - default-jre \ |
37 | | - flex \ |
38 | | - g++-11 \ |
39 | | - gcc-11 \ |
40 | | - git \ |
41 | | - google-perftools \ |
42 | | - libfl-dev \ |
43 | | - libgoogle-perftools-dev \ |
44 | | - libffi-dev \ |
45 | | - libreadline-dev \ |
46 | | - pkg-config \ |
47 | | - python3 \ |
48 | | - python3-dev \ |
49 | | - python3-orderedmultidict \ |
50 | | - python3-pip \ |
51 | | - swig \ |
52 | | - tcl-dev \ |
53 | | - tclsh \ |
54 | | - uuid \ |
55 | | - uuid-dev \ |
56 | | - wget \ |
57 | | - && apt clean && rm -rf /var/lib/apt/lists/* \ |
58 | | - && update-ca-certificates |
| 23 | + && apt autoclean && apt clean && apt -y autoremove \ |
| 24 | + && rm -rf /var/lib/apt/lists/* |
59 | 25 |
|
60 | | -############################################################################### |
| 26 | +# |
61 | 27 | # GHDL |
62 | | -############################################################################### |
63 | | - |
64 | | -WORKDIR /root |
| 28 | +# |
65 | 29 |
|
66 | 30 | RUN git clone --depth 1 https://github.com/ghdl/ghdl \ |
67 | 31 | && mkdir ghdl/build && cd ghdl/build \ |
68 | 32 | && ../configure --prefix=/usr/local \ |
69 | | - && make && make install \ |
| 33 | + && make -j$(nproc) && make install \ |
70 | 34 | && cd /root && rm -fr ghdl |
71 | 35 |
|
72 | | -############################################################################### |
| 36 | +# |
73 | 37 | # Yosys |
74 | | -############################################################################### |
75 | | - |
76 | | -WORKDIR /root |
| 38 | +# |
77 | 39 |
|
78 | 40 | RUN git clone --depth 1 https://github.com/YosysHQ/yosys \ |
79 | | - && cd yosys \ |
80 | | - && make && make install \ |
| 41 | + && cd yosys && git submodule update --init \ |
| 42 | + && make -j$(nproc) && make install \ |
81 | 43 | && cd /root && rm -fr yosys |
82 | 44 |
|
83 | | -############################################################################### |
| 45 | +# |
84 | 46 | # ghdl-yosys-plugin |
85 | | -############################################################################### |
86 | | - |
87 | | -WORKDIR /root |
| 47 | +# |
88 | 48 |
|
89 | 49 | RUN git clone --depth 1 https://github.com/ghdl/ghdl-yosys-plugin.git \ |
90 | | - && cd ghdl-yosys-plugin \ |
91 | | - && make && make install \ |
| 50 | + && cd ghdl-yosys-plugin && git submodule update --init \ |
| 51 | + && make -j$(nproc) && make install \ |
92 | 52 | && cd /root && rm -fr ghdl-yosys-plugin |
93 | | - |
94 | | -############################################################################### |
95 | | -# synlig |
96 | | -############################################################################### |
97 | | - |
98 | | -WORKDIR /root |
99 | | - |
100 | | -RUN git clone --depth 1 https://github.com/chipsalliance/synlig \ |
101 | | - && cd synlig \ |
102 | | - && git submodule sync \ |
103 | | - && git submodule update --init --recursive third_party/surelog \ |
104 | | - && git submodule update --init --recursive third_party/yosys \ |
105 | | - && make install \ |
106 | | - && cp /root/synlig/out/current/share/yosys/plugins/systemverilog.so /usr/local/share/yosys/plugins \ |
107 | | - && cd /root && rm -fr synlig |
0 commit comments