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.

Dockerfile 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # linux base image
  2. FROM alpine
  3. # set up environment variables
  4. ENV TARGET="sh3eb-elf" \
  5. PREFIX="$HOME/opt/sh3eb-elf-2.31.1-8.2.0" \
  6. PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/bin:/opt/sh3eb-elf-2.31.1-8.2.0/fxsdk/bin"
  7. # dependencies
  8. RUN apk update && apk add --update --no-cache \
  9. bash \
  10. git \
  11. build-base \
  12. gmp-dev \
  13. mpfr-dev \
  14. mpc1-dev \
  15. pcre-dev \
  16. libpng-dev \
  17. python3 \
  18. py3-pillow \
  19. flex
  20. # extract archives (binutils & gcc)
  21. ADD binutils-2.31.1.tar.xz gcc-8.2.0.tar.xz $PREFIX/
  22. # binutils
  23. RUN cd $PREFIX && mkdir build-binutils && cd build-binutils && \
  24. ../binutils-2.31.1/configure --prefix=$PREFIX --target=$TARGET --disable-nls && \
  25. make && make install
  26. # gcc
  27. RUN cd $PREFIX && mkdir build-gcc && cd build-gcc && \
  28. ../gcc-8.2.0/configure --prefix=$PREFIX --target=$TARGET --enable-languages=c,c++ --without-headers --with-newlib --disable-nls && \
  29. make all-gcc && make install-gcc
  30. # link gcc with libgcc
  31. # need to fix the contrib/dl script : https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg549371.html
  32. RUN cd $PREFIX/gcc-8.2.0 && \
  33. sed -i 's/sha512sum --check/sha512sum -c/g' ./contrib/download_prerequisites && \
  34. ./contrib/download_prerequisites && \
  35. cd $PREFIX/build-gcc && \
  36. make all-target-libgcc && make install-target-libgcc
  37. # TODO git clone with commit number (or find a better way to rebuild from this)
  38. # fxsdk
  39. ADD fxsdk $PREFIX/fxsdk
  40. RUN cd $PREFIX/fxsdk && bash configure --prefix=$PREFIX && make && make install
  41. # gint
  42. ADD gint $PREFIX/gint
  43. RUN cd $PREFIX/gint && mkdir build.fx && cd build.fx && \
  44. ../configure --target=fx9860g && make && make install
  45. WORKDIR /casio
  46. # Build :
  47. # docker build -t casio .
  48. # Run :
  49. # - Linux
  50. # docker run -u 0 -it --rm -v $(pwd):/casio casio
  51. # - Windows
  52. # docker run -u 0 -it --rm -v "/$(pwd)":/casio casio