-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.uefi960
55 lines (46 loc) · 1.93 KB
/
Dockerfile.uefi960
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
#
# Dockerfile.uefi960: UEFI Build environment for hikey960
#
FROM ubuntu:16.04
MAINTAINER John Stultz <[email protected]>
ENV TERM xterm
# Update the image to the lastest updates
RUN apt-get update && apt-get -y dist-upgrade && apt-get clean && apt-get -y autoremove
# Get tools
RUN apt-get update && apt-get install -y \
bc \
gcc \
gdisk \
git \
g++ \
libncurses5-dev \
libssl-dev \
make \
python \
python-pycurl \
python-crypto \
uuid-dev \
sudo \
wget \
vim \
xz-utils
# make username a variable, so the script is portable
# add '--build-arg user_name=$USER' to the docker build command
ARG --description="user name for container" user_name=docker
# Add $user_name user
RUN useradd -m $user_name && echo "$user_name:docker" | chpasswd && adduser $user_name sudo
RUN mkdir -p /opt/toolchain/ && cd /opt/toolchain/ && \
wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz && \
tar -xf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz && \
wget http://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz && \
tar -xf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
USER $user_name
RUN cd ~ && mkdir uefi-code && cd uefi-code && \
git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git -b integration && \
mv trusted-firmware-a arm-trusted-firmware && \
git clone https://github.com/96boards-hikey/edk2 -b testing/hikey960_v2.5 && \
git clone https://github.com/96boards-hikey/OpenPlatformPkg -b testing/hikey960_v1.3.4 && \
git clone https://github.com/96boards-hikey/l-loader -b testing/hikey960_v1.2 && \
git clone https://github.com/OP-TEE/optee_os.git -b 3.0.0
RUN cd ~/uefi-code/edk2 && ln -sf ../OpenPlatformPkg
ENTRYPOINT cd ~/uefi-code/l-loader && ./build_uefi.sh hikey960 && cd ~/uefi-code/ ; /bin/bash