aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <[email protected]>2024-11-11 06:29:18 +0100
committerShuah Khan <[email protected]>2024-11-19 15:26:30 -0700
commitd28252440428d37076de166c3d576a5d2f4a53e8 (patch)
tree8f7265d41ccc162d3794ac5f0c2862558dd8932d
parent95b6d723a00710f129b81556c93fdd994c105ab1 (diff)
kunit: qemu_configs: Add LoongArch config
Add a basic config to run kunit tests on LoongArch. This requires QEMU 9.1.0 or later for the necessary direct kernel boot support. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Bibo Mao <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
-rw-r--r--tools/testing/kunit/qemu_configs/loongarch.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
new file mode 100644
index 000000000000..a874a2156e0f
--- /dev/null
+++ b/tools/testing/kunit/qemu_configs/loongarch.py
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
+
+from ..qemu_config import QemuArchParams
+
+QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
+ kconfig='''
+CONFIG_EFI_STUB=n
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+''',
+ qemu_arch='loongarch64',
+ kernel_path='arch/loongarch/boot/vmlinux.elf',
+ kernel_command_line='console=ttyS0',
+ extra_qemu_params=[
+ '-machine', 'virt',
+ '-cpu', 'max',])