Compare commits
No commits in common. "46a1ed07f64ce9af14e6e82823339129aa107744" and "cc2ca85a91b6eaed1a159b2fffbbc629953edb6d" have entirely different histories.
46a1ed07f6
...
cc2ca85a91
2 changed files with 4 additions and 44 deletions
20
Dockerfile
20
Dockerfile
|
@ -12,7 +12,7 @@ RUN apt-get update && \
|
||||||
patch libstdc++6 rsync git meson ninja-build
|
patch libstdc++6 rsync git meson ninja-build
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
RUN wget https://github.com/crosstool-ng/crosstool-ng/releases/download/crosstool-ng-1.26.0/crosstool-ng-1.26.0.tar.xz && \
|
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 && \
|
tar -xvf crosstool-ng-1.26.0.tar.xz && \
|
||||||
rm crosstool-ng-1.26.0.tar.xz && \
|
rm crosstool-ng-1.26.0.tar.xz && \
|
||||||
cd crosstool-ng-1.26.0 && \
|
cd crosstool-ng-1.26.0 && \
|
||||||
|
@ -21,45 +21,33 @@ RUN wget https://github.com/crosstool-ng/crosstool-ng/releases/download/crosstoo
|
||||||
make install && \
|
make install && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf crosstool-ng-1.26.0
|
rm -rf crosstool-ng-1.26.0
|
||||||
|
|
||||||
ADD ct-ng.config .config
|
ADD ct-ng.config .config
|
||||||
RUN /usr/local/ct/bin/ct-ng build
|
RUN /usr/local/ct/bin/ct-ng build
|
||||||
|
|
||||||
RUN cd /build/ && \
|
RUN cd /build/ && \
|
||||||
git clone https://github.com/fail0verflow/hbc.git /build/hbc && \
|
git clone https://github.com/fail0verflow/hbc.git /build/hbc && \
|
||||||
cd /build/hbc/channel/wiiload && \
|
cd /build/hbc/channel/wiiload && \
|
||||||
git checkout 13305cfbe5db47eebc5e62aeed14f7adfbb83a5a && \
|
git checkout 13305cfbe5db47eebc5e62aeed14f7adfbb83a5a && \
|
||||||
make
|
make
|
||||||
|
|
||||||
RUN git clone https://github.com/fail0verflow/bootmii-utils.git /build/bootmii-utils && \
|
RUN git clone https://github.com/fail0verflow/bootmii-utils.git /build/bootmii-utils && \
|
||||||
cd /build/bootmii-utils/client && \
|
cd /build/bootmii-utils/client && \
|
||||||
git checkout a32b8f6520d136677213fcbb730035a7e89567e2 && \
|
git checkout a32b8f6520d136677213fcbb730035a7e89567e2 && \
|
||||||
make
|
make
|
||||||
|
|
||||||
RUN git clone https://github.com/nullgemm/doltool.git /build/doltool && \
|
|
||||||
cd /build/doltool && \
|
|
||||||
git checkout 716ca5390bb6467689165db595079e84c80b9b46 && \
|
|
||||||
make
|
|
||||||
|
|
||||||
## final build image
|
## final build image
|
||||||
FROM ubuntu:${VARIANT}
|
FROM ubuntu:${VARIANT}
|
||||||
ENV DEBIAN_FRONTEND="noninteractive"
|
ENV DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
patch ninja-build make bc ccache gcc libncurses-dev \
|
patch ninja-build make bc ccache gcc libncurses-dev \
|
||||||
kmod bison flex libssl-dev openssl binutils-powerpc-linux-gnu
|
kmod bison flex libssl-dev openssl
|
||||||
|
|
||||||
RUN mkdir -p /usr/local/doltool/bin
|
|
||||||
ADD makedol.sh /usr/local/doltool/bin/makedol.sh
|
|
||||||
|
|
||||||
COPY --from=build /root/x-tools/powerpc-unknown-linux-gnu/ /usr/local/crosstool
|
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
|
COPY --from=build /build/hbc/channel/wiiload/wiiload /usr/local/crosstool/bin/wiiload
|
||||||
COPY --from=build /build/bootmii-utils/client/bootmii /usr/local/crosstool/bin/bootmii
|
COPY --from=build /build/bootmii-utils/client/bootmii /usr/local/crosstool/bin/bootmii
|
||||||
COPY --from=build /build/doltool/doltool /usr/local/doltool/bin/doltool
|
|
||||||
|
|
||||||
ENV PATH=/usr/local/crosstool/bin:$PATH
|
ENV PATH=/usr/local/crosstool/bin:$PATH
|
||||||
ENV PATH=/usr/local/doltool/bin:$PATH
|
|
||||||
ENV CROSS_COMPILE=powerpc-unknown-linux-gnu-
|
ENV CROSS_COMPILE=powerpc-unknown-linux-gnu-
|
||||||
ENV CC=powerpc-unknown-linux-gnu-gcc
|
ENV CC=powerpc-unknown-linux-gnu-gcc
|
||||||
ENV ARCH=powerpc
|
ENV ARCH=powerpc
|
||||||
|
|
28
makedol.sh
28
makedol.sh
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# copied from https://themkat.net/2022/12/19/gamecube_linux_sd_boot.html, which itself copied it from the now offline gc-linux wiki
|
|
||||||
# edited slightly to make it more readable and convenient to use
|
|
||||||
|
|
||||||
KSRC=${KSRC:-.}
|
|
||||||
target=${1:-zImage}
|
|
||||||
ofile=zImage
|
|
||||||
|
|
||||||
[ -r ${KSRC}/arch/powerpc/boot/${target} ] || {
|
|
||||||
echo "Can't find target image ${KSRC}/arch/powerpc/boot/${target}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
cp ${KSRC}/arch/powerpc/boot/${target} ${ofile}
|
|
||||||
|
|
||||||
CROSS=powerpc-linux-gnu-
|
|
||||||
|
|
||||||
echo "+ building DOL"
|
|
||||||
load=$(${CROSS}readelf -l "$ofile" | perl -lane'printf"%08x\n",hex($F[3])+0x80000000 if /LOAD/;')
|
|
||||||
echo " LOAD: $load"
|
|
||||||
entry=$(${CROSS}readelf -l "$ofile" | perl -lane'printf"%08x\n",hex($F[2])+0x80000000 if /Entry point/;')
|
|
||||||
echo " EP : $entry"
|
|
||||||
|
|
||||||
${CROSS}objcopy -O binary -R .comment -R .shstrtab -R .symtab -R .strtab -R .gnu.attributes ${ofile} ${ofile}.bin
|
|
||||||
doltool -c ${ofile}.bin $load $entry
|
|
||||||
doltool -i ${ofile}.dol
|
|
||||||
echo ""
|
|
Loading…
Add table
Add a link
Reference in a new issue