smaller image
This commit is contained in:
parent
e51801f0af
commit
3c6ef6af8d
2 changed files with 38 additions and 13 deletions
51
Dockerfile
51
Dockerfile
|
@ -1,17 +1,42 @@
|
|||
FROM ubuntu:22.04
|
||||
# [Choice] bionic (18.04), focal (20.04)
|
||||
ARG VARIANT="focal"
|
||||
|
||||
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && apt-get -y install tzdata
|
||||
FROM ubuntu:${VARIANT} AS build
|
||||
|
||||
RUN apt-get update && apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
|
||||
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
|
||||
patch libstdc++6 rsync git meson ninja-build ccache
|
||||
RUN wget -P /tmp/ http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.xz
|
||||
RUN cd /tmp/
|
||||
RUN tar xvf /tmp/crosstool-ng-1.26.0.tar.xz -C /tmp/
|
||||
ADD ct-ng.config /tmp/crosstool-ng-1.26.0/.config
|
||||
RUN cd /tmp/crosstool-ng-1.26.0/ && ./configure --enable-local && make && ./ct-ng build
|
||||
ADD wiiload.tar.gz /opt/
|
||||
RUN cd /opt/wiiload && make && make install
|
||||
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install \
|
||||
tzdata gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
|
||||
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
|
||||
patch libstdc++6 rsync git meson ninja-build
|
||||
|
||||
WORKDIR /build
|
||||
RUN wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.xz && \
|
||||
tar -xvf crosstool-ng-1.26.0.tar.xz && \
|
||||
rm crosstool-ng-1.26.0.tar.xz && \
|
||||
cd crosstool-ng-1.26.0 && \
|
||||
./configure --prefix=/usr/local/ct && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf crosstool-ng-1.26.0
|
||||
|
||||
ADD ct-ng.config .config
|
||||
RUN /usr/local/ct/bin/ct-ng build
|
||||
RUN git clone https://github.com/fail0verflow/hbc.git /build/hbc && cd /build/hbc/channel/wiiload && make
|
||||
|
||||
## Final build image
|
||||
FROM ubuntu:${VARIANT}
|
||||
|
||||
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install \
|
||||
patch ninja-build make bc ccache gcc libncurses-dev
|
||||
|
||||
COPY --from=build /root/x-tools/powerpc-unknown-linux-gnu/ /usr/local/crosstool
|
||||
COPY --from=build /build/hbc/channel/wiiload/wiiload /usr/local/crosstool/bin/wiiload
|
||||
|
||||
ENV PATH=/usr/local/crosstool/bin:$PATH
|
||||
ENV CROSS_COMPILE=powerpc-unknown-linux-gnu-
|
||||
ENV CC=powerpc-unknown-linux-gnu-gcc
|
||||
ENV ARCH=powerpc
|
||||
ENV PATH=/root/x-tools/powerpc-unknown-linux-gnu/bin:$PATH
|
||||
|
||||
WORKDIR /code
|
||||
|
|
BIN
wiiload.tar.gz
BIN
wiiload.tar.gz
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue