• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FROM ubuntu:22.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4        gcc libc6-dev qemu-user ca-certificates qemu-system-arm curl \
5        xz-utils patch file
6
7RUN mkdir /toolchain
8
9RUN curl --retry 5 -L https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2021.11-1.tar.bz2 | \
10    tar xjf - -C /toolchain --strip-components=1
11RUN /toolchain/relocate-sdk.sh
12
13ENV PATH=$PATH:/rust/bin:/toolchain/bin \
14    STAGING_DIR=/toolchain/armv7-buildroot-linux-uclibceabihf/sysroot \
15    CC_armv7_unknown_linux_uclibceabihf=arm-buildroot-linux-uclibcgnueabihf-gcc \
16    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF_LINKER=arm-buildroot-linux-uclibcgnueabihf-gcc \
17    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF_RUNNER="qemu-arm -L /toolchain/arm-buildroot-linux-uclibcgnueabihf/sysroot/"
18