riscof_sail (latest)

Published 2024-03-24 17:17:22 +01:00 by alex

Installation

docker pull git.minres.com/tooling/riscof_sail:latest
sha256:29de6a75713b8be1957e4524ad6602ebf8ec92ee4c079f45b6d8ac77682c73ec

Image Layers

ARG RELEASE
ARG LAUNCHPAD_BUILD_ARCH
LABEL org.opencontainers.image.ref.name=ubuntu
LABEL org.opencontainers.image.version=20.04
ADD file:a25798f31219000d6a82d2c9258743926b1a400530d12dbb1eadf2c2519f9888 in /
CMD ["/bin/bash"]
RUN /bin/sh -c ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime # buildkit
COPY /usr/local/bin/bwrap /usr/bin/bwrap # buildkit
COPY <<EOF /etc/apt/apt.conf.d/mirror-retry # buildkit
RUN /bin/sh -c apt-get -y update # buildkit
RUN /bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get -y upgrade # buildkit
RUN /bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential curl git rsync sudo unzip nano libcap-dev libx11-dev # buildkit
COPY /usr/local/bin/opam-2.0 /usr/bin/opam-2.0 # buildkit
RUN /bin/sh -c ln /usr/bin/opam-2.0 /usr/bin/opam # buildkit
COPY /usr/local/bin/opam-2.1 /usr/bin/opam-2.1 # buildkit
COPY /usr/local/bin/opam-master /usr/bin/opam-dev # buildkit
RUN /bin/sh -c ln /usr/bin/opam-dev /usr/bin/opam-2.2 # buildkit
RUN /bin/sh -c echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections # buildkit
COPY <<EOF /etc/sudoers.d/opam # buildkit
RUN /bin/sh -c chmod 440 /etc/sudoers.d/opam # buildkit
RUN /bin/sh -c chown root:root /etc/sudoers.d/opam # buildkit
RUN /bin/sh -c if getent passwd 1000; then userdel -r $(id -nu 1000); fi # buildkit
RUN /bin/sh -c adduser --uid 1000 --disabled-password --gecos '' opam # buildkit
RUN /bin/sh -c passwd -l opam # buildkit
RUN /bin/sh -c chown -R opam:opam /home/opam # buildkit
USER opam
ENV HOME=/home/opam
WORKDIR /home/opam
RUN /bin/sh -c mkdir .ssh # buildkit
RUN /bin/sh -c chmod 700 .ssh # buildkit
COPY <<EOF /home/opam/.opamrc-nosandbox # buildkit
COPY <<EOF /home/opam/opam-sandbox-disable # buildkit
RUN /bin/sh -c chmod a+x /home/opam/opam-sandbox-disable # buildkit
RUN /bin/sh -c sudo mv /home/opam/opam-sandbox-disable /usr/bin/opam-sandbox-disable # buildkit
COPY <<EOF /home/opam/.opamrc-sandbox # buildkit
COPY <<EOF /home/opam/opam-sandbox-enable # buildkit
RUN /bin/sh -c chmod a+x /home/opam/opam-sandbox-enable # buildkit
RUN /bin/sh -c sudo mv /home/opam/opam-sandbox-enable /usr/bin/opam-sandbox-enable # buildkit
RUN /bin/sh -c git config --global user.email "docker@example.com" # buildkit
RUN /bin/sh -c git config --global user.name "Docker" # buildkit
COPY . /home/opam/opam-repository # buildkit
RUN /bin/sh -c opam-sandbox-disable # buildkit
RUN /bin/sh -c opam init -k local -a /home/opam/opam-repository --bare # buildkit
RUN /bin/sh -c rm -rf .opam/repo/default/.git # buildkit
COPY Dockerfile /Dockerfile.opam # buildkit
ENV OPAMYES=1 OPAMCONFIRMLEVEL=unsafe-yes OPAMERRLOGLEN=0 OPAMPRECISETRACKING=1
USER root
RUN /bin/sh -c apt-get -y update # buildkit
RUN /bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get -y upgrade # buildkit
RUN /bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get -y install libzstd-dev # buildkit
USER opam
RUN /bin/sh -c opam switch create 5.1 --packages=ocaml-base-compiler.5.1.1 # buildkit
RUN /bin/sh -c opam pin add -k version ocaml-base-compiler 5.1.1 # buildkit
RUN /bin/sh -c opam install -y opam-depext # buildkit
ENTRYPOINT ["opam" "exec" "--"]
CMD ["/bin/sh" "-c" "bash"]
COPY Dockerfile /Dockerfile.ocaml # buildkit
USER root
ENV RISCV=/opt/riscv
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/riscv/bin
RUN /bin/sh -c mkdir $RISCV && chown root $RISCV # buildkit
RUN /bin/sh -c apt update # buildkit
RUN /bin/sh -c apt install -y --no-install-recommends autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool device-tree-compiler cmake patchutils bc zlib1g-dev libexpat-dev python3-pip build-essential z3 pkg-config zlib1g-dev git make g++ wget curl # buildkit
RUN /bin/sh -c pip install --upgrade pip && pip install conan==1.61 riscof # buildkit
RUN /bin/sh -c git clone https://github.com/riscv/riscv-gnu-toolchain -b 2021.04.23 && cd riscv-gnu-toolchain && git submodule init && sed -i '/qemu/d' .gitmodules && sed -i '/qemu/d' .git/config && git submodule update -j $(nproc) --recursive && ./configure --prefix=$RISCV --with-arch=rv64gc --with-abi=lp64d && make -j $(nproc) 1>/dev/null && make clean && ./configure --prefix=$RISCV --with-arch=rv32gc --with-abi=ilp32d && make -j $(nproc) 1>/dev/null && make clean && cd .. && rm -rf riscv-gnu-toolchain # buildkit
RUN /bin/sh -c opam install sail && eval $(opam env) && git clone https://github.com/riscv/sail-riscv.git && cd sail-riscv && make ARCH=RV64 c_emulator/riscv_sim_RV64 && make ARCH=RV32 c_emulator/riscv_sim_RV32 && cp /home/opam/sail-riscv/c_emulator/riscv_sim_RV32 /usr/bin/ && cp /home/opam/sail-riscv/c_emulator/riscv_sim_RV64 /usr/bin/ && cd .. && rm -rf /sail-riscv # buildkit
USER opam

Labels

Key Value
org.opencontainers.image.ref.name ubuntu
org.opencontainers.image.version 20.04
Details
Container
2024-03-24 17:17:22 +01:00
1
OCI / Docker
linux/amd64
2.0 GiB
Versions (1) View all
latest 2024-03-24