From c49165bb2328325b77eec3f726475ccee1e991f5 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 30 Sep 2020 20:44:53 +0200 Subject: [PATCH 1/3] Revert "picolibc: Add initial support for picolibc" This reverts commit 828c078c11709186f018306dec9de20592704daa. --- riotbuild/Dockerfile | 33 ---------------------------- riotbuild/cross-riscv-none-embed.txt | 17 -------------- 2 files changed, 50 deletions(-) delete mode 100644 riotbuild/cross-riscv-none-embed.txt diff --git a/riotbuild/Dockerfile b/riotbuild/Dockerfile index d932de8d..ecd54f42 100644 --- a/riotbuild/Dockerfile +++ b/riotbuild/Dockerfile @@ -73,7 +73,6 @@ RUN \ libtool \ libsdl2-dev:i386 \ m4 \ - ninja-build \ parallel \ protobuf-compiler \ python2 \ @@ -253,38 +252,6 @@ RUN echo 'Installing ESP32-S3 toolchain' >&2 && \ pip install --no-cache-dir pyserial ENV PATH $PATH:/opt/esp/xtensa-esp32s3-elf/bin -ARG PICOLIBC_REPO=https://github.com/keith-packard/picolibc -ARG PICOLIBC_TAG=1.4.6 -ARG PICOLIBC_URL=${PICOLIBC_REPO}/archive/${PICOLIBC_TAG}.tar.gz -ARG PICOLIBC_ARCHIVE=${PICOLIBC_TAG}.tar.gz - -RUN echo 'Building and Installing PicoLIBC' >&2 && \ - pip3 install --no-cache-dir meson && \ - mkdir -p /usr/src/picolibc && \ - cd /usr/src/picolibc/ &&\ - curl -L -o ${PICOLIBC_ARCHIVE} ${PICOLIBC_URL} && \ - tar -xf ${PICOLIBC_ARCHIVE} && \ - cd picolibc-${PICOLIBC_TAG} - -COPY cross-riscv-none-embed.txt /usr/src/picolibc/picolibc-${PICOLIBC_TAG}/ - -RUN cd /usr/src/picolibc/picolibc-${PICOLIBC_TAG} && \ - which riscv-none-embed-gcc && \ - ls -al /opt/xpack-riscv-none-embed-gcc-${RISCV_VERSION}/bin && \ - mkdir build-arm build-riscv build-esp32 && \ - cd build-riscv && \ - meson .. -Dtests=true -Dmultilib=false -Dincludedir=picolibc/riscv-none-embed/include -Dlibdir=picolibc/riscv-none-embed/lib --cross-file ../cross-riscv-none-embed.txt && \ - ninja && ninja install && \ - cd ../build-esp32 && \ - sh ../do-esp32-configure && \ - ninja && ninja install && \ - cd ../build-arm && \ - sh ../do-arm-configure && \ - ninja && ninja install - -# No need to keep the sources around -RUN rm -rf /usr/src/picolibc - # RIOT toolchains ARG RIOT_TOOLCHAIN_GCC_VERSION=10.1.0 ARG RIOT_TOOLCHAIN_PACKAGE_VERSION=18 diff --git a/riotbuild/cross-riscv-none-embed.txt b/riotbuild/cross-riscv-none-embed.txt deleted file mode 100644 index 5b9d49b3..00000000 --- a/riotbuild/cross-riscv-none-embed.txt +++ /dev/null @@ -1,17 +0,0 @@ -[binaries] -c = 'riscv-none-embed-gcc' -ar = 'riscv-none-embed-ar' -as = 'riscv-none-embed-as' -strip = 'riscv-none-embed-strip' -exe_wrapper = ['sh', '-c', 'test -z "$MESON_SOURCE_ROOT" || "$MESON_SOURCE_ROOT"/run-riscv "$@"', 'run-riscv'] - -[host_machine] -system = 'none' -cpu_family = 'riscv' -cpu = 'riscv' -endian = 'little' - -[properties] -c_args = [ '-nostdlib', '-msave-restore', '-fno-common' ] -needs_exe_wrapper = true -skip_sanity_check = true From dc6e40fcf04a1e4e6294496192862bb85c9030ce Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 3 Nov 2021 13:20:37 +0100 Subject: [PATCH 2/3] Dockerfile: install gcc from repository --- riotbuild/Dockerfile | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/riotbuild/Dockerfile b/riotbuild/Dockerfile index ecd54f42..1d7d58d5 100644 --- a/riotbuild/Dockerfile +++ b/riotbuild/Dockerfile @@ -66,12 +66,16 @@ RUN \ curl \ cython3 \ gcc-multilib \ + gcc-arm-none-eabi \ + gcc-riscv64-unknown-elf \ + gcc-xtensa-lx106 \ gdb \ g++-multilib \ libffi-dev \ libpcre3 \ libtool \ libsdl2-dev:i386 \ + libnewlib-arm-none-eabi \ m4 \ parallel \ protobuf-compiler \ @@ -128,24 +132,6 @@ RUN \ && echo 'Cleaning up installation files' >&2 && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /pkgs -# Install ARM GNU embedded toolchain -# For updates, see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads -ARG ARM_URLBASE=https://developer.arm.com/-/media/Files/downloads/gnu-rm -ARG ARM_URL=${ARM_URLBASE}/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -ARG ARM_MD5=2383e4eb4ea23f248d33adc70dc3227e -ARG ARM_FOLDER=gcc-arm-none-eabi-10.3-2021.10 -RUN echo 'Installing arm-none-eabi toolchain from arm.com' >&2 && \ - mkdir -p /opt && \ - curl -L -o /opt/gcc-arm-none-eabi.tar.bz2 ${ARM_URL} && \ - echo "${ARM_MD5} /opt/gcc-arm-none-eabi.tar.bz2" | md5sum -c && \ - tar -C /opt -jxf /opt/gcc-arm-none-eabi.tar.bz2 && \ - rm -f /opt/gcc-arm-none-eabi.tar.bz2 && \ - echo 'Removing documentation' >&2 && \ - rm -rf /opt/gcc-arm-none-eabi-*/share/doc - # No need to dedup, the ARM toolchain is already using hard links for the duplicated files - -ENV PATH ${PATH}:/opt/${ARM_FOLDER}/bin - # Install MIPS binary toolchain # For updates: https://www.mips.com/develop/tools/codescape-mips-sdk/ (select "Codescape GNU Toolchain") ARG MIPS_VERSION=2020.06-01 From 1afc188da87e3c03af4d9c51abf383a2cf815a37 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 30 Sep 2020 21:01:49 +0200 Subject: [PATCH 3/3] Dockerfile: install picolibc from Debian package --- riotbuild/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/riotbuild/Dockerfile b/riotbuild/Dockerfile index 1d7d58d5..11ad2592 100644 --- a/riotbuild/Dockerfile +++ b/riotbuild/Dockerfile @@ -165,6 +165,18 @@ RUN mkdir -p /opt && \ ENV PATH $PATH:/opt/xpack-riscv-none-embed-gcc-${RISCV_VERSION}/bin +# Install picolibc Debian package +ARG PICOLIBC_VERSION=1.7.9-1 +RUN wget -P /tmp http://ftp.de.debian.org/debian/pool/main/p/picolibc/picolibc-riscv64-unknown-elf_${PICOLIBC_VERSION}_all.deb && \ + dpkg -i /tmp/picolibc-riscv64-unknown-elf_${PICOLIBC_VERSION}_all.deb && \ + rm /tmp/picolibc-riscv64-unknown-elf_${PICOLIBC_VERSION}_all.deb && \ + wget -P /tmp http://ftp.de.debian.org/debian/pool/main/p/picolibc/picolibc-arm-none-eabi_${PICOLIBC_VERSION}_all.deb && \ + dpkg -i /tmp/picolibc-arm-none-eabi_${PICOLIBC_VERSION}_all.deb && \ + rm /tmp/picolibc-arm-none-eabi_${PICOLIBC_VERSION}_all.deb && \ + wget -P /tmp http://ftp.de.debian.org/debian/pool/main/p/picolibc/picolibc-xtensa-lx106-elf_${PICOLIBC_VERSION}_all.deb && \ + dpkg -i /tmp/picolibc-xtensa-lx106-elf_${PICOLIBC_VERSION}_all.deb && \ + rm /tmp/picolibc-xtensa-lx106-elf_${PICOLIBC_VERSION}_all.deb + # Install complete ESP8266 toolchain in /opt/esp (139 MB after cleanup) # remember https://github.com/RIOT-OS/RIOT/pull/10801 when updating RUN echo 'Installing ESP8266 toolchain' >&2 && \