diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-05-15 13:59:26 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-05-20 08:05:51 +0000 |
| commit | 8f9f99255c8300d167597e8dd602e9a48c7d00b4 (patch) | |
| tree | 3a3c7a50d3d8626a98bc4f66812d161c66791d08 /tools/docker/env | |
| parent | b84f0537fc547b8b745e01c0d02b009b10ad9611 (diff) | |
tools/docker: add rust compiler
Add the new dependencies necessary for generating RUST=y Linux configs
and for building RUST=y kernels.
Diffstat (limited to 'tools/docker/env')
| -rw-r--r-- | tools/docker/env/Dockerfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/docker/env/Dockerfile b/tools/docker/env/Dockerfile index f96d05d75..cf7137306 100644 --- a/tools/docker/env/Dockerfile +++ b/tools/docker/env/Dockerfile @@ -112,6 +112,20 @@ RUN chmod 0777 /syzkaller ENV SOURCEDIR_FUCHSIA /syzkaller/fuchsia ENV SOURCEDIR_NETBSD /syzkaller/netbsd +# Rust toolchain for kernel builds. +ENV RUSTUP_HOME=/usr/local/rustup +ENV CARGO_HOME=/usr/local/cargo +ENV PATH=/usr/local/cargo/bin:$PATH +ENV RUST_VERSION=1.87.0 +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUST_VERSION +RUN rustup component add rust-src +RUN cargo install --locked bindgen-cli + +# Use the latest libdw-dev release, otherwise we get compilation error when CONFIG_RUST=y. +RUN echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/bookworm-backports.list +RUN apt-get update +RUN apt-get install -y --no-install-recommends libdw-dev/bookworm-backports libelf-dev/bookworm-backports + # Install node to pass act jobs (https://github.com/nektos/act) RUN apt-get install -y -q nodejs |
