Docker image for casio developpment on linux, with gint and fxsdk from Lephenixnoir.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

65 lines
1.9 KiB

# linux base image
FROM alpine
# set up environment variables for the compiler
ENV TARGET="sh3eb-elf" \
COMPILER="/opt/sh-elf-2.35-10.2.0" \
PATH="$PATH:/opt/sh-elf-2.35-10.2.0/bin"
# dependencies
RUN apk update && apk add --update --no-cache \
bash \
git \
build-base \
gmp-dev \
mpfr-dev \
mpc1-dev \
pcre-dev \
libpng-dev \
python3 \
py3-pillow \
flex
# extract archives (binutils & gcc)
ADD binutils-2.35.tar.xz gcc-10.2.0.tar.xz $COMPILER/
# binutils
RUN cd $COMPILER && mkdir build-binutils && cd build-binutils && \
../binutils-2.35/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --disable-nls --program-prefix=sh-elf- && \
make && make install
# gcc
RUN cd $COMPILER && mkdir build-gcc && cd build-gcc && \
../gcc-10.2.0/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --disable-nls --program-prefix=sh-elf- && \
make all-gcc && make install-gcc
# link gcc with libgcc
# need to fix the contrib/dl script : https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg549371.html
RUN cd $COMPILER/gcc-10.2.0 && \
sed -i 's/sha512sum --check/sha512sum -c/g' ./contrib/download_prerequisites && \
./contrib/download_prerequisites && \
cd $COMPILER/build-gcc && \
make all-target-libgcc && make install-target-libgcc
# set up environment variables for casio tools
ENV CASIO="/usr/local"
# fxsdk
ADD fxsdk $CASIO/fxsdk
RUN cd $CASIO/fxsdk && bash configure --prefix=$CASIO && make && make install
# gint
ADD gint $CASIO/gint
RUN cd $CASIO/gint && mkdir build.fx && cd build.fx && \
../configure --target=fx9860g && make && make install
WORKDIR /casio
# Build :
# docker build -t casio .
# Run :
# - Linux
# docker run -u 0 -it --rm -v $(pwd):/casio casio
# - Windows
# docker run -u 0 -it --rm -v "/$(pwd)":/casio casio