-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
55 lines (36 loc) · 1.27 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
###############################
### Stage for building LLVM ###
###############################
FROM ubuntu:20.04 AS llvm
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y git zip build-essential cmake ninja-build clang-11 && \
apt-get clean
COPY build-llvm.sh .
RUN /build-llvm.sh
######################################
### Stage for constructing sysroot ###
######################################
FROM ubuntu:20.04 AS sysroot
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y python3 rpm2cpio cpio git && \
apt-get clean
COPY sysroot/build-rootfs.py /sysroot/
COPY sysroot/*.patch /sysroot/
RUN /sysroot/build-rootfs.py --arch arm
RUN /sysroot/build-rootfs.py --arch arm64
RUN /sysroot/build-rootfs.py --arch x86
# Remove cached packages.
RUN rm -r /sysroot/*/.rpms
##############################
### Create a release image ###
##############################
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu binutils-i686-linux-gnu && \
apt-get clean
# Copy build results from previous stages.
COPY --from=llvm /toolchains/ /tizen_tools/toolchains/
COPY --from=sysroot /sysroot/ /tizen_tools/sysroot/