Created
March 1, 2024 18:14
-
-
Save jimbob88/9e92aef8b9b0817dc38c2f0e07f51337 to your computer and use it in GitHub Desktop.
Build Prizm SDK and FXSDK
This file contains hidden or 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
FROM alpine:3.14 | |
# Set up GiteaPC | |
## Install GiteaPC dependencies | |
RUN apk add --no-cache gcc curl git python3 make pkgconf | |
## Needs to use bash and yes | |
RUN apk add --no-cache bash | |
## Install GiteaPC and accept the path added | |
RUN curl "https://gitea.planet-casio.com/Lephenixnoir/GiteaPC/raw/branch/master/install.sh" -o /tmp/giteapc-install.sh | |
RUN yes | bash /tmp/giteapc-install.sh | |
## Update path with gitea installer | |
ENV PATH="${PATH}:/root/.local/bin" | |
# Setup fxsdk dependencies | |
## Designed for tui (in WSL normally) | |
RUN apk add --no-cache cmake py3-pillow libusb-dev sdl2-dev libpng-dev ncurses-dev | |
## Recommended for linux machines | |
RUN apk add --no-cache udisks2-dev | |
## Used for graphical user interface | |
RUN apk add --no-cache glib-dev | |
# Build and Install fx-sdk (has useful dependencies we can use) | |
## Install alpine build essentials | |
RUN apk add --no-cache alpine-sdk | |
## Install texinfo for binutils | |
RUN apk add --no-cache texinfo | |
## Build cross-compiler | |
RUN giteapc install -y Lephenixnoir/fxsdk Lephenixnoir/sh-elf-binutils Lephenixnoir/sh-elf-gcc | |
## Build math + C++ standard library | |
RUN giteapc install -y Lephenixnoir/OpenLibm Vhex-Kernel-Core/fxlibc Lephenixnoir/sh-elf-gcc | |
## Install Kernel Libraries | |
RUN giteapc install -y Lephenixnoir/gint Lephenixnoir/libprof | |
# Install other libfxcg dependencies | |
## Build and install mkg3a | |
RUN git clone https://gitlab.com/taricorp/mkg3a.git && cd /mkg3a && mkdir build && cd build && cmake .. && make && make install | |
## mpfr, mpc, gmp & libpng headers | |
RUN apk add --no-cache mpfr-dev mpc1-dev gmp-dev libpng-dev | |
## ppl-dev (not included in standard) | |
RUN apk add --no-cache ppl-dev --update-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted | |
# Help libfxcg find sh3eb-elf-gcc | |
# RUN SH3EB_LOC=$(find /root/.local/bin/ -name 'sh3eb-elf-gcc-*'| head -n 1) && ln -s $SH3EB_LOC /root/.local/bin/sh3eb-elf-gcc | |
# Grab the latest libfxcg | |
RUN git clone https://github.com/Jonimoose/libfxcg.git | |
WORKDIR /libfxcg | |
RUN sed -i 's/sh3eb-elf-/sh-elf-/g' toolchain/prizm_rules libfxcg/Makefile libc/Makefile | |
RUN make | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment