Skip to content

Commit a81abbc

Browse files
committed
CI: Update riscv64gc-linux job to 22.04, rename to riscv64gc-gnu
1 parent 99cb42c commit a81abbc

File tree

3 files changed

+39
-148
lines changed

3 files changed

+39
-148
lines changed

src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile renamed to src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile

+39-52
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
# based on armhf-gnu/Dockerfile
2-
FROM ubuntu:20.04
2+
FROM ubuntu:22.04
33

4-
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
4+
ARG DEBIAN_FRONTEND=noninteractive
55
RUN apt-get update -y && apt-get install -y --no-install-recommends \
6-
bc \
7-
bison \
8-
ca-certificates \
9-
cmake \
10-
cpio \
11-
curl \
12-
debian-ports-archive-keyring \
13-
debootstrap \
14-
flex \
15-
gcc \
16-
gcc-riscv64-linux-gnu \
17-
git \
18-
g++-riscv64-linux-gnu \
19-
g++ \
20-
libc6-dev \
21-
libc6-dev-riscv64-cross \
22-
libssl-dev \
23-
make \
24-
ninja-build \
25-
patch \
26-
python3 \
27-
qemu-system-misc \
28-
xz-utils
6+
bc \
7+
bzip2 \
8+
ca-certificates \
9+
cmake \
10+
cpio \
11+
curl \
12+
file \
13+
flex \
14+
bison \
15+
g++ \
16+
g++-riscv64-linux-gnu \
17+
git \
18+
libc6-dev \
19+
libc6-dev-riscv64-cross \
20+
libssl-dev \
21+
make \
22+
ninja-build \
23+
python3 \
24+
qemu-system-riscv64 \
25+
xz-utils
2926

30-
ENV ARCH=riscv
31-
ENV CROSS_COMPILE=riscv64-linux-gnu-
27+
ENV ARCH=riscv \
28+
CROSS_COMPILE=riscv64-linux-gnu-
3229

3330
WORKDIR /build
3431

3532
# From https://github.com/michaeljclark/busybear-linux/blob/master/conf/linux.config
36-
COPY host-x86_64/riscv64gc-linux/linux.config /build
33+
COPY host-x86_64/riscv64gc-gnu/linux.config /build
3734

3835
# Compile the kernel that we're going to be emulating with. This is
3936
# basically just done to be compatible with the QEMU target that we're going
@@ -49,29 +46,22 @@ RUN curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.16.tar.xz | tar
4946
# Compile an instance of busybox as this provides a lightweight system and init
5047
# binary which we will boot into. Only trick here is configuring busybox to
5148
# build static binaries.
52-
RUN curl https://busybox.net/downloads/busybox-1.31.1.tar.bz2 | tar xjf -
53-
COPY host-x86_64/riscv64gc-linux/0001-Remove-stime-function-calls.patch /build/busybox-1.31.1/
54-
RUN cd /build/busybox-1.31.1 && \
55-
patch -p1 -i 0001-Remove-stime-function-calls.patch && \
56-
make defconfig && \
57-
sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \
58-
make -j$(nproc) && \
59-
make install && \
60-
mv _install /tmp/rootfs && \
61-
cd /build && \
62-
rm -rf busybox-1.31.1
49+
RUN curl https://www.busybox.net/downloads/busybox-1.32.1.tar.bz2 | tar xjf - && \
50+
cd busybox-1.32.1 && \
51+
make defconfig && \
52+
sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config && \
53+
make -j$(nproc) && \
54+
make install && \
55+
mv _install /tmp/rootfs && \
56+
cd /build && \
57+
rm -rf busybox-1.32.1
6358

64-
# Download the ubuntu rootfs, which we'll use as a chroot for all our tests
65-
# This is only needed to provide /lib/* and /usr/lib/*
59+
# Download the ubuntu rootfs, which we'll use as a chroot for all our tests.
6660
WORKDIR /tmp
67-
RUN debootstrap --variant=minbase --arch=riscv64 --foreign focal /tmp/rootfs/ubuntu
68-
RUN cd rootfs && mkdir proc sys dev etc etc/init.d
69-
# rootfs/ubuntu/proc is in a weird state (access fails with ELOOP) until
70-
# rootfs/ubuntu/debootstrap/debootstrap --second-stage is run (under emulation),
71-
# but this takes ages. Instead hack it into a good enough state.
72-
# /proc is used by std::env::current_exe() (which is roughly
73-
# `readlink /proc/self/exe`)
74-
RUN cd rootfs/ubuntu && rm -rf proc && mkdir proc
61+
RUN mkdir rootfs/ubuntu
62+
RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04.2-base-riscv64.tar.gz | \
63+
tar xzf - -C rootfs/ubuntu && \
64+
cd rootfs && mkdir proc sys dev etc etc/init.d
7565

7666
# Copy over our init script, which starts up our test server and also a few other
7767
# misc tasks
@@ -95,9 +85,6 @@ RUN mkdir build && cd build && \
9585
WORKDIR /tmp
9686
RUN rm -rf /tmp/riscv-pk
9787

98-
COPY scripts/cmake.sh /scripts/
99-
RUN /scripts/cmake.sh
100-
10188
COPY scripts/sccache.sh /scripts/
10289
RUN sh /scripts/sccache.sh
10390

src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch

-96
This file was deleted.

0 commit comments

Comments
 (0)