mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-09-14 08:36:46 +10:00
The config for the serial console for riscv, CONFIG_SERIAL_EARLYCON_RISCV_SBI, added a dependency, CONFIG_RISCV_SBI_V01, at some point, so add that in to the base arch config. Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
from ..qemu_config import QemuArchParams
|
|
import os
|
|
import os.path
|
|
import sys
|
|
|
|
GITHUB_OPENSBI_URL = 'https://github.com/qemu/qemu/raw/master/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin'
|
|
OPENSBI_FILE = os.path.basename(GITHUB_OPENSBI_URL)
|
|
|
|
if not os.path.isfile(OPENSBI_FILE):
|
|
print('\n\nOpenSBI file is not in the current working directory.\n'
|
|
'Would you like me to download it for you from:\n' + GITHUB_OPENSBI_URL + ' ?\n')
|
|
response = input('yes/[no]: ')
|
|
if response.strip() == 'yes':
|
|
os.system('wget ' + GITHUB_OPENSBI_URL)
|
|
else:
|
|
sys.exit()
|
|
|
|
QEMU_ARCH = QemuArchParams(linux_arch='riscv',
|
|
kconfig='''
|
|
CONFIG_SOC_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-riscv64-generic-fw_dynamic.bin'])
|