Skip to content

Commit

Permalink
docker: add release build for Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
katsuhiro-suzuki-nsitexe committed Nov 20, 2023
1 parent b88073f commit 8e953e8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docker/Dockerfile_ubuntu22
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Usage:
# docker build -f file -t tagname:tagversion .
#
# Please specify environment variable by --build-arg var=value:
#
# http_proxy=xxx
# Proxy address.
#
# PARALLEL=num
# Enable parallel build using 'num' processes simultaneously.

FROM ubuntu:22.04

ARG PARALLEL
ARG PARALLELMFLAGS

RUN apt-get update && apt-get -y dist-upgrade
RUN apt-get -y install git gcc g++ make curl texinfo gawk flex bison \
device-tree-compiler autoconf automake unzip help2man \
expat libmpc-dev libgmp-dev libmpfr-dev libncurses-dev \
libtool libtool-bin python3-dev rsync install-info bzip2

RUN git clone https://github.com/nsitexe/akaria-riscv-toolchain && \
cd /akaria-riscv-toolchain && \
make install && \
mkdir -p /result && \
mv riscv64-unknown-elf \
riscv64-unknown-linux-gnu \
riscv64-unknown-linux-musl \
/result/ && \
rm -rf /akaria-riscv-toolchain/

RUN cd /result/ && \
strip --strip-unneeded */bin/* ; \
strip --strip-unneeded */libexec/gcc/*/12.0.1/* ; \
tar czf riscv64-unknown-elf_ubuntu22.tar.gz \
riscv64-unknown-elf/ && \
tar czf riscv64-unknown-linux-gnu_ubuntu22.tar.gz \
riscv64-unknown-linux-gnu/ && \
tar czf riscv64-unknown-linux-musl_ubuntu22.tar.gz \
riscv64-unknown-linux-musl/ && \
rm -rf riscv64-unknown-elf \
riscv64-unknown-linux-gnu \
riscv64-unknown-linux-musl

0 comments on commit 8e953e8

Please sign in to comment.