linux/tools/testing/kunit/qemu_configs/riscv.py
Conor Dooley 1553a1c482 RISC-V: drop SOC_VIRT for ARCH_VIRT
The ARCH_ and SOC_ versions of this symbol have persisted for quite a
while now in parallel. Generated .config files from previous LTS kernels
should have both. Finally remove SOC_VIRT and update all config files
using it.

Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-04-10 11:37:50 +01:00

29 lines
857 B
Python

from ..qemu_config import QemuArchParams
import os
import os.path
import sys
OPENSBI_FILE = 'opensbi-riscv64-generic-fw_dynamic.bin'
OPENSBI_PATH = '/usr/share/qemu/' + OPENSBI_FILE
if not os.path.isfile(OPENSBI_PATH):
print('\n\nOpenSBI bios was not found in "' + OPENSBI_PATH + '".\n'
'Please ensure that qemu-system-riscv is installed, or edit the path in "qemu_configs/riscv.py"\n')
sys.exit()
QEMU_ARCH = QemuArchParams(linux_arch='riscv',
kconfig='''
CONFIG_ARCH_VIRT=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_RISCV_SBI_V01=y
CONFIG_SERIAL_EARLYCON_RISCV_SBI=y''',
qemu_arch='riscv64',
kernel_path='arch/riscv/boot/Image',
kernel_command_line='console=ttyS0',
extra_qemu_params=[
'-machine', 'virt',
'-cpu', 'rv64',
'-bios', OPENSBI_PATH])