1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements.  See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership.  The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License.  You may obtain a copy of the License at
8#
9#   http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied.  See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18FROM ubuntu:20.04
19MAINTAINER Teaclave Contributors <dev@teaclave.apache.org>
20ENV DEBIAN_FRONTEND=noninteractive
21
22# Install dependencies for building OP-TEE
23RUN apt-get update && \
24    apt-get install -y \
25    git \
26    android-tools-adb \
27    android-tools-fastboot \
28    autoconf \
29    automake \
30    bc \
31    bison \
32    build-essential \
33    ccache \
34    cscope \
35    curl \
36    device-tree-compiler \
37    expect \
38    flex \
39    ftp-upload \
40    gdisk \
41    iasl \
42    libattr1-dev \
43    libcap-dev \
44    libfdt-dev \
45    libftdi-dev \
46    libglib2.0-dev \
47    libgmp-dev \
48    libhidapi-dev \
49    libmpc-dev \
50    libncurses5-dev \
51    libpixman-1-dev \
52    libssl-dev \
53    libtool \
54    make \
55    mtools \
56    netcat \
57    ninja-build \
58    python \
59    python-crypto \
60    python3-crypto \
61    python-pyelftools \
62    python3-pycryptodome \
63    python3-pyelftools \
64    python3-serial \
65    rsync \
66    unzip \
67    uuid-dev \
68    xdg-utils \
69    xterm \
70    xz-utils \
71    zlib1g-dev \
72    wget \
73    cpio \
74    libcap-ng-dev \
75    screen \
76    libvdeplug-dev \
77    libsdl2-dev
78
79RUN apt-get install -y software-properties-common && \
80    add-apt-repository ppa:linuxuprising/libpng12 && \
81    apt-get update && \
82    apt-get install libpng12-0
83
84# Install Rust
85RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
86  . $HOME/.cargo/env && \
87  rustup default nightly-2019-07-08 && \
88  rustup component add rust-src && \
89  rustup target install aarch64-unknown-linux-gnu && \
90  rustup default 1.44.0 && cargo +1.44.0 install xargo && \
91  rustup default nightly-2019-07-08
92
93ENV PATH="/root/.cargo/bin:$PATH"
94