Skip to content

Commit 9975b0f

Browse files
dianpopaacatangiu
authored andcommitted
aarch64: Dockerfile needed changes
* hardcode rustc version * add cross compiled libfdt Signed-off-by: Diana Popa <[email protected]>
1 parent d4a89cd commit 9975b0f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tools/devctr/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ FROM ubuntu:18.04
44
# The Rust toolchain layer will get updated most frequently, but we could keep the system
55
# dependencies layer intact for much longer.
66

7+
ARG RUST_TOOLCHAIN="1.32.0"
78
ARG TMP_BUILD_DIR=/tmp/build
89
ARG FIRECRACKER_SRC_DIR="/firecracker"
910
ARG FIRECRACKER_BUILD_DIR="$FIRECRACKER_SRC_DIR/build"
@@ -44,6 +45,7 @@ RUN apt-get update \
4445
python3-dev \
4546
python3-pip \
4647
python3-venv \
48+
xz-utils \
4749
zlib1g-dev \
4850
&& python3 -m pip install \
4951
setuptools \
@@ -60,12 +62,21 @@ RUN apt-get update \
6062
requests \
6163
requests-unixsocket \
6264
retry \
65+
# install cross-compiled fdt library
66+
&& mkdir "$TMP_BUILD_DIR" \
67+
&& cd "$TMP_BUILD_DIR" \
68+
&& curl -LO http://ftp.de.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.4.7-3_arm64.deb \
69+
&& ar x libfdt-dev_1.4.7-3_arm64.deb \
70+
&& tar -xf data.tar.xz \
71+
&& cp usr/lib/aarch64-linux-gnu/libfdt.a /usr/lib/aarch64-linux-gnu/libfdt.a \
72+
&& cd / \
73+
&& rm -rf "$TMP_BUILD_DIR" \
6374
&& rm -rf /var/lib/apt/lists/*
6475

6576
# Install the Rust toolchain
6677
#
6778
RUN mkdir "$TMP_BUILD_DIR" \
68-
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
79+
&& curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN" \
6980
&& rustup target add x86_64-unknown-linux-musl \
7081
&& rustup target add aarch64-unknown-linux-musl \
7182
&& rustup component add rustfmt \

0 commit comments

Comments
 (0)