fiatlux/docker/firmware/Dockerfile
2022-07-04 21:08:20 +02:00

34 lines
No EOL
2.7 KiB
Docker

# syntax=docker/dockerfile:1
#FROM debian:sid
#RUN apt update && apt install -y make bash gawk g++ gcc libc6-dev flex bison automake autoconf gperf texinfo wget git bzip2 help2man libtool libtool-bin unrar-free unzip ncurses-dev python2-dev python2 && mkdir /app && chown 1000:1000 /app && cd /app && useradd user && usermod -aG dialout user
#USER 1000
#RUN cd app && git clone --recursive https://github.com/SuperHouse/esp-open-rtos.git modules/rtos && git clone --recursive https://github.com/pfalcon/esp-open-sdk.git modules/sdk
#RUN cd app \
# && sed -i 's/GNU bash, version (3\\\.\[1-9\]|4)/GNU bash, version (3.[1-9]|4|5)/g' modules/sdk/crosstool-NG/configure.ac \
# && mkdir -p modules/sdk/crosstool-NG/.build/tarballs \
# && wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz -O modules/sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz \
# && wget https://libisl.sourceforge.io/isl-0.14.tar.bz2 -O modules/sdk/crosstool-NG/.build/tarballs/isl-0.14.tar.bz2 \
# && wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 -O modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar.bz2
#RUN cd app \
# && bzip2 -d modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar.bz2\
# && tar -xf modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar gcc-4.8.5/gcc/reload1.c \
# && sed -i 's/spill_indirect_levels++;/spill_indirect_levels = 1;/g' gcc-4.8.5/gcc/reload1.c \
# && tar -uf modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar gcc-4.8.5/gcc/reload1.c \
# && bzip2 -z1 modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar \
# && rm -rf gcc-4.8.5 modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar
#RUN cd app/modules/sdk && export CT_EXPERIMENTAL=y && export CT_ALLOW_BUILD_AS_ROOT=y && export CT_ALLOW_BUILD_AS_ROOT_SURE=y && make standalone=n -j$(nproc) || cat /app/modules/sdk/crosstool-NG/build.log #&& wget -N https://raw.githubusercontent.com/espressif/esptool/master/esptool.py -O xtensa-lx106-elf/bin/esptool.py
#RUN cd app && tar -xf modules/sdk/crosstool-NG/.build/tarballs/gcc-4.8.5.tar.bz2 gcc-4.8.5/gcc/reload1.c && grep spill_indirect_levels gcc-4.8.5/gcc/reload1.c
#USER 0
#RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial esptool
#RUN apt install -y --reinstall python-is-python3
#USER 1000
#WORKDIR /app
#ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH
FROM docker-repo.service.intern.lab.or.it:5000/fiatlux-build-env
USER 0
RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial esptool
RUN apt install -y --reinstall python-is-python3
USER 1000
WORKDIR /app
ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH