Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ if [[ "$task" == "kernel" ]]; then
if [[ -n "$LLVM" ]]; then
cmd+="-e LLVM=$LLVM "
fi

if [[ -n "$RUST" ]]; then
cmd+="-e RUST=$RUST "
fi
fi

if [[ "$task" == "ppctests" ]]; then
Expand Down
11 changes: 11 additions & 0 deletions build/scripts/container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ rc=0

if [[ "$1" == "kernel" ]]; then
cc="${CROSS_COMPILE}gcc"

# As rust is supported via LLVM
if [[ -n "$RUST" ]]; then
LLVM=1
fi

if [[ -n "$CLANG" || -n "$LLVM" ]]; then
cc="clang"
fi
Expand Down Expand Up @@ -68,6 +74,11 @@ if [[ "$1" == "kernel" ]]; then
(set -x; make $verbose $quiet $llvm "$cc" $DEFCONFIG)
fi

if [[ -n "$RUST" ]]; then
echo "Enabling RUST...!!!"
(set -x; make $verbose $quiet $llvm "$cc" rustavailable)
fi

if [[ -n "$MERGE_CONFIG" ]]; then
echo "## MERGE_CONFIG = $MERGE_CONFIG"

Expand Down
18 changes: 17 additions & 1 deletion build/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ RUN apt-get -q -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -q -y install --no-install-recommends \
bc \
bindgen \
bison \
bsdmainutils \
bzip2 \
ca-certificates \
ccache \
cpio \
crossbuild-essential-powerpc \
curl \
gcc-multilib-powerpc-linux-gnu \
dwarves \
file \
Expand All @@ -37,6 +39,8 @@ RUN apt-get -q -y update && \
libfuse-dev \
liblz4-tool \
libssl-dev \
lld \
llvm \
lzop \
make \
openssl \
Expand All @@ -45,11 +49,23 @@ RUN apt-get -q -y update && \
u-boot-tools \
rename \
rsync \
rustc \
rustfmt \
rust-clippy \
rust-src \
sparse \
xz-utils \
$(/tmp/packages.sh) && \
rm -rf /var/lib/apt/lists/* /tmp/packages.sh /var/cache/* /var/log/dpkg.log

ENV RUSTUP_HOME=/opt/rustup
ENV CARGO_HOME=/opt/cargo
ENV PATH="/opt/cargo/bin:${PATH}"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --no-modify-path
RUN rustup toolchain install nightly-2026-01-28 \
&& rustup default nightly-2026-01-28 \
&& rustup component add rust-src --toolchain nightly-2026-01-28 \
&& cargo install --locked bindgen-cli
COPY ubuntu/make-links.sh /tmp/make-links.sh
RUN /tmp/make-links.sh ${compiler_version} && rm /tmp/make-links.sh

Expand Down