Message ID | c72e5884711da51424ad2f9c7933bb294129aef3.1677579750.git.geert+renesas@glider.be |
---|---|
State | Accepted |
Commit | 8110a3cab05ee4a26f36015f0423fb2b5cea1392 |
Headers | show |
Series | kunit: tool: Add support for SH under QEMU | expand |
On Tue, 28 Feb 2023 at 18:31, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > > 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> > --- I finally managed to get this working: it's fine under openSUSE tumbleweed (with the kernel.org toolchain), and in a debian stable container, so I'll chalk the problems I was having up to my Google-ified setup here. Even if that turns out to be a more widespread issue, it'll be easier to track down with these patches applied, So, Reviewed-by: David Gow <davidgow@google.com> Cheers, -- David > All tests succeed, except for the usual suspects. > drivers/clk/.kunitconfig cannot be run as CONFIG_COMMON_CLK is not > available. > --- > tools/testing/kunit/qemu_configs/sh.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > create mode 100644 tools/testing/kunit/qemu_configs/sh.py > > diff --git a/tools/testing/kunit/qemu_configs/sh.py b/tools/testing/kunit/qemu_configs/sh.py > new file mode 100644 > index 0000000000000000..78a474a5b95f3a7d > --- /dev/null > +++ b/tools/testing/kunit/qemu_configs/sh.py > @@ -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']) > -- > 2.34.1 >
diff --git a/tools/testing/kunit/qemu_configs/sh.py b/tools/testing/kunit/qemu_configs/sh.py new file mode 100644 index 0000000000000000..78a474a5b95f3a7d --- /dev/null +++ b/tools/testing/kunit/qemu_configs/sh.py @@ -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'])
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> --- All tests succeed, except for the usual suspects. drivers/clk/.kunitconfig cannot be run as CONFIG_COMMON_CLK is not available. --- tools/testing/kunit/qemu_configs/sh.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/testing/kunit/qemu_configs/sh.py