Path: blob/master/tools/testing/kunit/qemu_configs/riscv.py
26292 views
from ..qemu_config import QemuArchParams1import os2import os.path3import sys45OPENSBI_FILE = 'opensbi-riscv64-generic-fw_dynamic.bin'6OPENSBI_PATH = '/usr/share/qemu/' + OPENSBI_FILE78if not os.path.isfile(OPENSBI_PATH):9print('\n\nOpenSBI bios was not found in "' + OPENSBI_PATH + '".\n'10'Please ensure that qemu-system-riscv is installed, or edit the path in "qemu_configs/riscv.py"\n')11sys.exit()1213QEMU_ARCH = QemuArchParams(linux_arch='riscv',14kconfig='''15CONFIG_ARCH_VIRT=y16CONFIG_SERIAL_8250=y17CONFIG_SERIAL_8250_CONSOLE=y18CONFIG_SERIAL_OF_PLATFORM=y19CONFIG_RISCV_SBI_V01=y20CONFIG_SERIAL_EARLYCON_RISCV_SBI=y''',21qemu_arch='riscv64',22kernel_path='arch/riscv/boot/Image',23kernel_command_line='console=ttyS0',24extra_qemu_params=[25'-machine', 'virt',26'-cpu', 'rv64',27'-bios', OPENSBI_PATH])282930