Skip to content

Commit

Permalink
feat: bump to Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Oct 22, 2024
1 parent 73e22ba commit 92adcb9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 32 deletions.
24 changes: 7 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

FROM ubuntu:22.04 AS tools-env
FROM ubuntu:24.04 AS tools-env
ARG IMAGE_KERNEL_VERSION=v0.20.0
ARG LINUX_VERSION=6.5.13-ctsi-1
ARG LINUX_HEADERS_URLPATH=https://github.com/cartesi/image-kernel/releases/download/${IMAGE_KERNEL_VERSION}/linux-libc-dev-riscv64-cross-${LINUX_VERSION}-${IMAGE_KERNEL_VERSION}.deb
Expand All @@ -32,38 +32,28 @@ apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends \
dpkg-dev \
g++-12 \
gcc-12 \
g++ \
gcc \
make \
ca-certificates \
git \
wget \
adduser \
libclang-dev \
pkg-config \
dpkg-cross \
gcc-12-riscv64-linux-gnu \
g++-12-riscv64-linux-gnu

for tool in cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool; do
update-alternatives --install /usr/bin/riscv64-linux-gnu-$tool riscv64-linux-gnu-$tool /usr/bin/riscv64-linux-gnu-$tool-12 12
update-alternatives --install /usr/bin/$tool $tool /usr/bin/$tool-12 12
done
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 12
gcc-riscv64-linux-gnu \
g++-riscv64-linux-gnu

wget -O ${LINUX_HEADERS_FILEPATH} ${LINUX_HEADERS_URLPATH}
echo "2723435e8b45d8fb7a79e9344f6dc517b3dbc08e03ac17baab311300ec475c08 ${LINUX_HEADERS_FILEPATH}" | sha256sum --check
apt-get install -y --no-install-recommends ${LINUX_HEADERS_FILEPATH}
apt-get install -y --no-install-recommends --allow-downgrades ${LINUX_HEADERS_FILEPATH}

adduser developer -u 499 --gecos ",,," --disabled-password
mkdir -p ${BUILD_BASE}/tools && chown -R developer:developer ${BUILD_BASE}/tools
rm -rf /var/lib/apt/lists/* ${LINUX_HEADERS_FILEPATH}
EOF

ENV RISCV_ARCH="rv64gc"
ENV RISCV_ABI="lp64d"
ENV CFLAGS="-march=$RISCV_ARCH -mabi=$RISCV_ABI"
ENV TOOLCHAIN_PREFIX="riscv64-linux-gnu-"

FROM tools-env AS builder
COPY --chown=developer:developer sys-utils/ ${BUILD_BASE}/tools/sys-utils/

Expand Down
29 changes: 15 additions & 14 deletions fs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Final image
FROM ubuntu:22.04
FROM ubuntu:24.04
ARG TOOLS_DEB=machine-emulator-tools-v0.16.2.deb
ADD ${TOOLS_DEB} /tmp/
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
busybox-static=1:1.30.1-7ubuntu3 \
coreutils=8.32-4.1ubuntu1.2 \
bash=5.1-6ubuntu1.1 \
psmisc=23.4-2build3 \
bc=1.07.1-3build1 \
curl=7.81.0-1ubuntu1.18 \
device-tree-compiler=1.6.1-1 \
jq=1.6-2.1ubuntu3 \
lua5.4=5.4.4-1 \
lua-socket=3.0~rc1+git+ac3201d-6 \
xxd=2:8.2.3995-1ubuntu2.19 \
file=1:5.41-3ubuntu0.1 \
stress-ng=0.13.12-2ubuntu1 \
busybox-static=1:1.36.1-6ubuntu3.1 \
coreutils=9.4-3ubuntu6 \
bash=5.2.21-2ubuntu4 \
psmisc=23.7-1build1 \
bc=1.07.1-3ubuntu4 \
curl=8.5.0-2ubuntu10.4 \
device-tree-compiler=1.7.0-2build1 \
jq=1.7.1-3build1 \
lua5.4=5.4.6-3build2 \
lua-socket=3.1.0-1 \
xxd=2:9.1.0016-1ubuntu7.3 \
file=1:5.45-3build1 \
stress-ng=0.17.06-1build1 \
libatomic1=14.2.0-4ubuntu2~24.04 \
/tmp/${TOOLS_DEB} \
&& \
rm -rf /var/lib/apt/lists/* /tmp/${TOOLS_DEB}
2 changes: 1 addition & 1 deletion rollup-http/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[target.riscv64gc-unknown-linux-gnu]
linker = "riscv64-linux-gnu-gcc-12"
linker = "riscv64-linux-gnu-gcc"

[net]
git-fetch-with-cli = true

0 comments on commit 92adcb9

Please sign in to comment.