Skip to content

Instantly share code, notes, and snippets.

@BeMg
Created August 17, 2019 17:24
Show Gist options
  • Select an option

  • Save BeMg/00def10cf3d00e904a31fe33f5b9d094 to your computer and use it in GitHub Desktop.

Select an option

Save BeMg/00def10cf3d00e904a31fe33f5b9d094 to your computer and use it in GitHub Desktop.
dockerfile for riscv_toolchain
FROM ubuntu:18.04
MAINTAINER BeMg
RUN apt-get update && apt-get install -y git autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk \
build-essential bison flex device-tree-compiler texinfo gperf libtool patchutils bc zlib1g-dev device-tree-compiler pkg-config libexpat-dev && mkdir risc-v
ENV RISCV /risc-v
RUN cd ~ && git clone -b rvv-0.7.x --recursive https://github.com/riscv/riscv-gnu-toolchain && \
cd riscv-gnu-toolchain && ./configure --prefix=$RISCV --with-arch=rv64gcv --with-abi=lp64 && make -j4
ENV PATH="/risc-v/bin:${PATH}"
RUN cd ~ && git clone https://github.com/riscv/riscv-pk.git && \
cd riscv-pk && mkdir build && cd build && \
../configure --prefix=$RISCV --host=riscv64-unknown-elf && \
make -j4 && make install -j4
RUN cd ~ && git clone https://github.com/riscv/riscv-isa-sim.git && \
cd riscv-isa-sim && mkdir build && cd build && \
../configure --prefix=$RISCV && make -j4 && make install -j6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment