This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
98 lines (84 loc) · 2.05 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
FROM ubuntu:16.04
ARG VERSION=2018.3
ARG FILE=petalinux-v2018.3-final-installer.run
ADD accept-eula.sh /
ADD sdk/${VERSION} /tmp/petalinux
RUN cat /tmp/petalinux/tpeta201803.gz* | zcat > /${FILE} \
&& rm -rf /tmp/petalinux/
#install dependences:
RUN dpkg --add-architecture i386 && apt-get update
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y tzdata \
&& ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt-get install -y \
python \
python3 \
make \
zlib1g-dev \
tar \
xinetd \
build-essential \
gcc \
sudo \
tofrodos \
iproute2 \
gawk \
net-tools \
expect \
libncurses5-dev \
tftpd \
libssl-dev \
flex \
bison \
libselinux1 \
gnupg \
wget \
socat \
gcc-multilib \
libsdl1.2-dev \
libglib2.0-dev \
lib32z1-dev \
zlib1g:i386 \
libgtk2.0-0 \
screen \
pax \
diffstat \
xvfb \
xterm \
texinfo \
gzip \
unzip \
cpio \
chrpath \
autoconf \
lsb-release \
libtool \
libtool-bin \
kmod \
locales \
git
RUN locale-gen en_US.UTF-8 && update-locale
#make a Vivado user
RUN adduser --disabled-password --gecos '' vivado \
&& usermod -aG sudo vivado \
&& echo "vivado ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Replace the bash
RUN sudo rm /bin/sh \
&& sudo ln -s /bin/bash /bin/sh
# run the install
RUN chmod a+x /${FILE} \
&& mkdir -p /opt/Xilinx/Petalinux/ \
&& chmod 777 /tmp /opt/Xilinx/Petalinux/ \
&& cd /tmp \
&& sudo -u vivado /accept-eula.sh /${FILE} /opt/Xilinx/Petalinux/${VERSION} \
&& rm -f /${FILE} /accept-eula.sh
USER vivado
ENV HOME /home/vivado
ENV LANG en_US.UTF-8
RUN mkdir /home/vivado/project
WORKDIR /home/vivado/project
# add vivado tools to path
RUN echo "source /opt/Xilinx/Petalinux/${VERSION}/settings.sh > /dev/null 2>&1" >> /home/vivado/.bashrc
# add test bsp project
COPY bsp/xilinx-zc706-v2018.3-final.bsp /home/vivado/project/