-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: add release build for Ubuntu 22.04
- Loading branch information
1 parent
b88073f
commit 8e953e8
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |