Revert "Add a disabled builder for riscv64 rva23 emulated tests"
This reverts commit 289688ca494ddc45bcd0b0706dc173c19fbb7caa.
This commit is contained in:
parent
93a8c1d12c
commit
87fd28998c
4 changed files with 1 additions and 189 deletions
|
|
@ -1,108 +0,0 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
||||
bc \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
cpio \
|
||||
curl \
|
||||
file \
|
||||
flex \
|
||||
bison \
|
||||
g++ \
|
||||
g++-riscv64-linux-gnu \
|
||||
git \
|
||||
libc6-dev \
|
||||
libc6-dev-riscv64-cross \
|
||||
libssl-dev \
|
||||
make \
|
||||
ninja-build \
|
||||
python3 \
|
||||
xz-utils \
|
||||
opensbi \
|
||||
u-boot-qemu \
|
||||
libslirp0 \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
libglib2.0-dev \
|
||||
libpixman-1-dev \
|
||||
libsdl2-dev \
|
||||
libfdt-dev \
|
||||
python3 \
|
||||
python3-pip
|
||||
|
||||
ENV ARCH=riscv \
|
||||
CROSS_COMPILE=riscv64-linux-gnu-
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# From https://github.com/michaeljclark/busybear-linux/blob/master/conf/linux.config
|
||||
COPY host-x86_64/riscv64a23-gnu/linux.config /build
|
||||
|
||||
# qemu v10.0.2 fully support
|
||||
RUN curl https://gitlab.com/qemu-project/qemu/-/archive/v10.0.2/qemu-v10.0.2.tar.bz2 | tar xjf - && \
|
||||
cd qemu-v10.0.2 && \
|
||||
./configure --target-list=riscv64-softmmu \
|
||||
--enable-sdl --enable-debug --enable-fdt --enable-slirp && \
|
||||
make -j && make install
|
||||
|
||||
# use the opensbi fw from apt-get install
|
||||
RUN cp /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin /tmp
|
||||
|
||||
# Compile the kernel that we're going to be emulating with. This is
|
||||
# basically just done to be compatible with the QEMU target that we're going
|
||||
# to be using when running tests.
|
||||
RUN curl https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.97.tar.xz | tar xJf - && \
|
||||
cp linux.config linux-6.6.97/.config && \
|
||||
cd /build/linux-6.6.97 && \
|
||||
make olddefconfig && \
|
||||
make -j$(nproc) Image && \
|
||||
cp arch/riscv/boot/Image /tmp && \
|
||||
rm -rf linux-6.6.97
|
||||
|
||||
# Compile an instance of busybox as this provides a lightweight system and init
|
||||
# binary which we will boot into. Only trick here is configuring busybox to
|
||||
# build static binaries.
|
||||
RUN curl https://www.busybox.net/downloads/busybox-1.37.0.tar.bz2 | tar xjf - && \
|
||||
cd busybox-1.37.0 && \
|
||||
make defconfig && \
|
||||
sed -i 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config && \
|
||||
sed -i 's/^CONFIG_TC=y$/# CONFIG_TC is not set/' .config && \
|
||||
sed -i 's/CONFIG_SHA1_HWACCEL=y/# CONFIG_SHA1_HWACCEL is not set/' .config && \
|
||||
sed -i 's/CONFIG_SHA256_HWACCEL=y/# CONFIG_SHA256_HWACCEL is not set/' .config && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
mv _install /tmp/rootfs && \
|
||||
cd /build && \
|
||||
rm -rf busybox-1.37.0
|
||||
|
||||
# Download the ubuntu rootfs, which we'll use as a chroot for all our tests.
|
||||
WORKDIR /tmp
|
||||
RUN mkdir rootfs/ubuntu
|
||||
RUN curl https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.2-base-riscv64.tar.gz | \
|
||||
tar xzf - -C rootfs/ubuntu && \
|
||||
cd rootfs && mkdir proc sys dev etc etc/init.d
|
||||
|
||||
# Copy over our init script, which starts up our test server and also a few other
|
||||
# misc tasks
|
||||
COPY scripts/qemu-bare-bones-rcS rootfs/etc/init.d/rcS
|
||||
RUN chmod +x rootfs/etc/init.d/rcS
|
||||
|
||||
# Helper to quickly fill the entropy pool in the kernel
|
||||
COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c
|
||||
RUN riscv64-linux-gnu-gcc addentropy.c -o rootfs/addentropy -static
|
||||
|
||||
COPY scripts/sccache.sh /scripts/
|
||||
RUN sh /scripts/sccache.sh
|
||||
|
||||
# Avoid "fatal: detected dubious ownership in repository at '/checkout'" error
|
||||
RUN git config --global --add safe.directory "*"
|
||||
|
||||
ENV RUST_CONFIGURE_ARGS \
|
||||
--set target.riscv64a23-unknown-linux-gnu.linker=riscv64-linux-gnu-gcc \
|
||||
--set target.riscv64a23-unknown-linux-gnu.qemu-rootfs=/tmp/rootfs
|
||||
ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target riscv64a23-unknown-linux-gnu
|
||||
|
||||
ENV NO_CHANGE_USER=1
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
CONFIG_DEFAULT_HOSTNAME="busybear"
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_DIAG=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_NETLINK_DIAG=y
|
||||
# CONFIG_WIRELESS is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
# CONFIG_WLAN is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_HVC_RISCV_SBI=y
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_SIFIVE_PLIC=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_CRYPTO_ECHAINIV is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_PRINTK_TIME=y
|
||||
|
|
@ -40,7 +40,6 @@ static HOSTS: &[&str] = &[
|
|||
"powerpc64le-unknown-linux-gnu",
|
||||
"powerpc64le-unknown-linux-musl",
|
||||
"riscv64gc-unknown-linux-gnu",
|
||||
"riscv64a23-unknown-linux-gnu",
|
||||
"s390x-unknown-linux-gnu",
|
||||
"sparcv9-sun-solaris",
|
||||
"x86_64-apple-darwin",
|
||||
|
|
@ -156,7 +155,6 @@ static TARGETS: &[&str] = &[
|
|||
"riscv64gc-unknown-none-elf",
|
||||
"riscv64gc-unknown-linux-gnu",
|
||||
"riscv64gc-unknown-linux-musl",
|
||||
"riscv64a23-unknown-linux-gnu",
|
||||
"s390x-unknown-linux-gnu",
|
||||
"sparc64-unknown-linux-gnu",
|
||||
"sparcv9-sun-solaris",
|
||||
|
|
|
|||
|
|
@ -111,9 +111,7 @@ fn prepare_rootfs(target: &str, rootfs: &Path, server: &Path, rootfs_img: &Path)
|
|||
"arm-unknown-linux-gnueabihf" | "aarch64-unknown-linux-gnu" => {
|
||||
prepare_rootfs_cpio(rootfs, rootfs_img)
|
||||
}
|
||||
"riscv64a23-unknown-linux-gnu" | "riscv64gc-unknown-linux-gnu" => {
|
||||
prepare_rootfs_ext4(rootfs, rootfs_img)
|
||||
}
|
||||
"riscv64gc-unknown-linux-gnu" => prepare_rootfs_ext4(rootfs, rootfs_img),
|
||||
_ => panic!("{} is not supported", target),
|
||||
}
|
||||
}
|
||||
|
|
@ -236,31 +234,6 @@ fn start_qemu_emulator(target: &str, rootfs: &Path, server: &Path, tmpdir: &Path
|
|||
.arg(&format!("file={},format=raw,id=hd0", &rootfs_img.to_string_lossy()));
|
||||
t!(cmd.spawn());
|
||||
}
|
||||
"riscv64a23-unknown-linux-gnu" => {
|
||||
let mut cmd = Command::new("qemu-system-riscv64");
|
||||
cmd.arg("-nographic")
|
||||
.arg("-machine")
|
||||
.arg("virt")
|
||||
.arg("-cpu")
|
||||
.arg("rva23s64")
|
||||
.arg("-m")
|
||||
.arg("1024")
|
||||
.arg("-bios")
|
||||
.arg("/tmp/fw_jump.bin")
|
||||
.arg("-kernel")
|
||||
.arg("/tmp/Image")
|
||||
.arg("-append")
|
||||
.arg("quiet console=ttyS0 root=/dev/vda rw")
|
||||
.arg("-netdev")
|
||||
.arg("user,id=net0,hostfwd=tcp::12345-:12345")
|
||||
.arg("-device")
|
||||
.arg("virtio-net-device,netdev=net0,mac=00:00:00:00:00:00")
|
||||
.arg("-device")
|
||||
.arg("virtio-blk-device,drive=hd0")
|
||||
.arg("-drive")
|
||||
.arg(&format!("file={},format=raw,id=hd0,if=none", &rootfs_img.to_string_lossy()));
|
||||
t!(cmd.spawn());
|
||||
}
|
||||
_ => panic!("cannot start emulator for: {}", target),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue