Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ubuntu:22.04 to ubuntu:24.04 #122

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

# Adding rust binaries to PATH.
ENV PATH="$PATH:/root/.cargo/bin"
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile.riscv64
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Compile QEMU 9.0.2
# ---------------------------------------------------------
FROM ubuntu:22.04 AS qemu_builder
FROM ubuntu:24.04 AS qemu_builder

COPY riscv64/build_qemu_system_riscv64.sh /opt/src/scripts/build.sh
RUN /opt/src/scripts/build.sh

# Compile kernel 6.10 since we need AIA drivers
# ---------------------------------------------------------
FROM ubuntu:22.04 AS kernel_builder
FROM ubuntu:24.04 AS kernel_builder

COPY riscv64/build_kernel.sh /opt/src/scripts/build.sh
RUN /opt/src/scripts/build.sh

# Compile OpenSBI
# ---------------------------------------------------------
FROM ubuntu:22.04 AS opensbi_builder
FROM ubuntu:24.04 AS opensbi_builder

COPY riscv64/build_opensbi.sh /opt/src/scripts/build.sh
RUN /opt/src/scripts/build.sh

# Build rootfs with sshd and Rust related packages ready
# ---------------------------------------------------------
FROM --platform=linux/riscv64 riscv64/ubuntu:22.04 AS rootfs_builder
FROM --platform=linux/riscv64 riscv64/ubuntu:24.04 AS rootfs_builder

ENV PATH="$PATH:/root/.cargo/bin"
COPY build_container.sh /opt/src/scripts/build.sh
RUN /opt/src/scripts/build.sh

# Finalize
# ---------------------------------------------------------
FROM ubuntu:22.04 AS final
FROM ubuntu:24.04 AS final

ARG OUTPUT=/output
ARG QEMU_DIR=/opt/qemu
Expand Down
10 changes: 2 additions & 8 deletions build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ set -ex
ARCH=$(uname -m)
RUST_TOOLCHAIN="1.83.0"

# See: https://stackoverflow.com/questions/78105004/docker-build-fails-because-unable-to-install-libc-bin
if [ "$ARCH" == "aarch64" ]; then
rm /var/lib/dpkg/info/libc-bin.*
DEBIAN_FRONTEND="noninteractive" apt-get clean
fi

apt-get update

# DEBIAN_FRONTEND is set for tzdata.
Expand All @@ -22,7 +16,7 @@ DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
build-essential libjsoncpp25 librhash0 make \
autoconf autoconf-archive automake libtool \
libclang-dev iproute2 \
libasound2 libasound2-dev \
libasound2t64 libasound2-dev \
libepoxy0 libepoxy-dev \
libdrm2 libdrm-dev \
libgbm1 libgbm-dev libgles2 \
Expand Down Expand Up @@ -132,7 +126,7 @@ if [ "$ARCH" != "riscv64" ]; then
fi

# dbus-daemon expects this folder
mkdir /run/dbus
mkdir -p /run/dbus

# `riscv64` specific, which setup the rootfs for `riscv64` VM to execute actual
# RISC-V tests through prepared ssh server.
Expand Down
Loading