kunit: tool: Add support for SH under QEMU
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 28 Feb 2023 10:31:03 +0000 (11:31 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 5 Apr 2023 18:51:16 +0000 (12:51 -0600)
Add basic support to run SH under QEMU via kunit_tool using the
virtualized r2d platform.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/qemu_configs/sh.py [new file with mode: 0644]

diff --git a/tools/testing/kunit/qemu_configs/sh.py b/tools/testing/kunit/qemu_configs/sh.py
new file mode 100644 (file)
index 0000000..78a474a
--- /dev/null
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+from ..qemu_config import QemuArchParams
+
+QEMU_ARCH = QemuArchParams(linux_arch='sh',
+                          kconfig='''
+CONFIG_CPU_SUBTYPE_SH7751R=y
+CONFIG_MEMORY_START=0x0c000000
+CONFIG_SH_RTS7751R2D=y
+CONFIG_RTS7751R2D_PLUS=y
+CONFIG_SERIAL_SH_SCI=y''',
+                          qemu_arch='sh4',
+                          kernel_path='arch/sh/boot/zImage',
+                          kernel_command_line='console=ttySC1',
+                          serial='null',
+                          extra_qemu_params=[
+                                           '-machine', 'r2d',
+                                           '-serial', 'mon:stdio'])