• 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-mipsel curl \
5        xz-utils patch
6
7RUN mkdir /toolchain
8
9# binutils	2.33.1
10# gcc	9.3.0
11# gdb	8.3.1
12# linux-headers	4.9.234
13# uclibc	1.0.34
14RUN curl --retry 5 -L https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--uclibc--stable-2020.08-1.tar.bz2 | \
15    tar xjf - -C /toolchain --strip-components=1
16RUN /toolchain/relocate-sdk.sh
17
18ENV PATH=$PATH:/rust/bin:/toolchain/bin \
19    STAGING_DIR=/toolchain/mipsel-buildroot-linux-uclibc/sysroot \
20    CC_mipsel_unknown_linux_uclibc=mipsel-buildroot-linux-uclibc-gcc \
21    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_UCLIBC_LINKER=mipsel-buildroot-linux-uclibc-gcc \
22    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_UCLIBC_RUNNER="qemu-mipsel -L /toolchain/mipsel-buildroot-linux-uclibc/sysroot/"
23