tools/testing/kunit/qemu_configs/riscv32.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Add a basic config to run kunit tests on riscv32.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
tools/testing/kunit/qemu_configs/riscv32.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/testing/kunit/qemu_configs/riscv32.py b/tools/testing/kunit/qemu_configs/riscv32.py
new file mode 100644
index 0000000000000000000000000000000000000000..b79ba0ae30f8573035b3401be337b379eba97e26
--- /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'])
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250214-kunit-qemu-riscv32-fb38d659c373
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
On Mon, 7 Apr 2025 at 16:17, Thomas Weißschuh <thomas.weissschuh@linutronix.de> wrote: > > Add a basic config to run kunit tests on riscv32. > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> > --- Thanks very much: this is working well here (even if qemu for riscv32 is _slow_ on my machine)! Reviewed-by: David Gow <davidgow@google.com> Cheers, -- David > tools/testing/kunit/qemu_configs/riscv32.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/tools/testing/kunit/qemu_configs/riscv32.py b/tools/testing/kunit/qemu_configs/riscv32.py > new file mode 100644 > index 0000000000000000000000000000000000000000..b79ba0ae30f8573035b3401be337b379eba97e26 > --- /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']) > > --- > base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8 > change-id: 20250214-kunit-qemu-riscv32-fb38d659c373 > > Best regards, > -- > Thomas Weißschuh <thomas.weissschuh@linutronix.de> >
© 2016 - 2026 Red Hat, Inc.