From: Thomas Weißschuh Date: Mon, 7 Apr 2025 08:17:12 +0000 (+0200) Subject: kunit: qemu_configs: Add riscv32 config X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9aa08e761b67e3d8b5ca2ff1e9194a73d3000cce;p=users%2Fdwmw2%2Flinux.git kunit: qemu_configs: Add riscv32 config Add a basic config to run kunit tests on riscv32. Link: https://lore.kernel.org/r/20250407-kunit-qemu-riscv32-v1-1-7b9800034a35@linutronix.de Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Signed-off-by: Shuah Khan --- diff --git a/tools/testing/kunit/qemu_configs/riscv32.py b/tools/testing/kunit/qemu_configs/riscv32.py new file mode 100644 index 0000000000000..b79ba0ae30f85 --- /dev/null +++ b/tools/testing/kunit/qemu_configs/riscv32.py @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0 + +from ..qemu_config import QemuArchParams + +QEMU_ARCH = QemuArchParams(linux_arch='riscv', + kconfig=''' +CONFIG_NONPORTABLE=y +CONFIG_ARCH_RV32I=y +CONFIG_ARCH_VIRT=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +''', + qemu_arch='riscv32', + kernel_path='arch/riscv/boot/Image', + kernel_command_line='console=ttyS0', + extra_qemu_params=['-machine', 'virt'])