aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.d/opensbi/Dockerfile
blob: 5ccf4151f4a1fca9489b238a8778029e230efdb2 (plain)
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
#
# Docker image to cross-compile OpenSBI firmware binaries
#
FROM ubuntu:18.04

MAINTAINER Bin Meng <bmeng.cn@gmail.com>

# Install packages required to build OpenSBI
RUN apt update \
    && \
    \
    DEBIAN_FRONTEND=noninteractive \
    apt install --assume-yes --no-install-recommends \
        build-essential \
        ca-certificates \
        git \
        make \
	python3 \
        wget \
    && \
    \
    rm -rf /var/lib/apt/lists/*

# Manually install the kernel.org "Crosstool" based toolchains for gcc-8.3
RUN wget -O - \
    https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.3.0/x86_64-gcc-8.3.0-nolibc-riscv32-linux.tar.xz \
    | tar -C /opt -xJ
RUN wget -O - \
    https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.3.0/x86_64-gcc-8.3.0-nolibc-riscv64-linux.tar.xz \
    | tar -C /opt -xJ

# Export the toolchains to the system path
ENV PATH="/opt/gcc-8.3.0-nolibc/riscv32-linux/bin:${PATH}"
ENV PATH="/opt/gcc-8.3.0-nolibc/riscv64-linux/bin:${PATH}"