Skip to content

Commit a10b3af

Browse files
nazar-codethinkLawrenceHunter
authored andcommitted
Add Vivado in a container manual
1 parent 92b2d0b commit a10b3af

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/dev_env/install_vivado.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Vivado 2018.2 installation in a container
2+
==================================
3+
4+
1. Create Dockerfile in a separate folder with the following content:
5+
```
6+
FROM ubuntu:20.04
7+
ARG DEBIAN_FRONTEND=noninteractive
8+
ENV TZ=Europe/London
9+
RUN apt-get update && apt-get install -y gedit libtinfo5 libncurses5-dev iproute2
10+
# gedit is useful to test that graphics passthrough is working
11+
# iproute2 is useful to check mac address
12+
# libtinfo5 and libncurses5 seem to be needed for Vivado
13+
# With ubuntu 22.04 vivado 2018.2 exits quickly after start
14+
# Ubuntu 20.04 seems to be more stable
15+
```
16+
17+
2. Run `podman build --tag vivado .` in that folder
18+
3. To get graphics passthrough with X, you'll need to create xauth file.
19+
You can use the following script that I called gen_xauthority.sh:
20+
```
21+
#!/usr/bin/env bash
22+
23+
CONTAINERNAME="${1:-vivado}"
24+
touch .Xauthority && \
25+
xauth -f .Xauthority add $CONTAINERNAME/unix:0 MIT-MAGIC-COOKIE-1 1ee043605d90ec22c2975d91a6b0798b && \
26+
xauth add $CONTAINERNAME/unix:0 MIT-MAGIC-COOKIE-1 1ee043605d90ec22c2975d91a6b0798b
27+
# hex numbers are random
28+
```
29+
4. To run the container you can use the following script that I called run.sh:
30+
```
31+
#!/usr/bin/env bash
32+
33+
./gen_xauthority.sh && \
34+
exec \
35+
podman run -it --rm -v .Xauthority:/root/.Xauthority:ro -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v .:/mnt -e "DISPLAY" -h vivado --workdir /mnt --network podman --mac-address e2:fa:df:52:9f:78 vivado
36+
# mac-address is random, you can use any
37+
```
38+
5. Inside container run Vivado 2018.2 installer, and point it to /mnt folder (as / will be destroyed)

0 commit comments

Comments
 (0)