Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / kunit / qemu_configs / riscv.py
blobc87758030ff791ca84d2b3fe1380f01ea2afc69d
1 from ..qemu_config import QemuArchParams
2 import os
3 import os.path
4 import sys
6 OPENSBI_FILE = 'opensbi-riscv64-generic-fw_dynamic.bin'
7 OPENSBI_PATH = '/usr/share/qemu/' + OPENSBI_FILE
9 if not os.path.isfile(OPENSBI_PATH):
10 print('\n\nOpenSBI bios was not found in "' + OPENSBI_PATH + '".\n'
11 'Please ensure that qemu-system-riscv is installed, or edit the path in "qemu_configs/riscv.py"\n')
12 sys.exit()
14 QEMU_ARCH = QemuArchParams(linux_arch='riscv',
15 kconfig='''
16 CONFIG_ARCH_VIRT=y
17 CONFIG_SERIAL_8250=y
18 CONFIG_SERIAL_8250_CONSOLE=y
19 CONFIG_SERIAL_OF_PLATFORM=y
20 CONFIG_RISCV_SBI_V01=y
21 CONFIG_SERIAL_EARLYCON_RISCV_SBI=y''',
22 qemu_arch='riscv64',
23 kernel_path='arch/riscv/boot/Image',
24 kernel_command_line='console=ttyS0',
25 extra_qemu_params=[
26 '-machine', 'virt',
27 '-cpu', 'rv64',
28 '-bios', OPENSBI_PATH])