File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 'ppc32_mac' ,
2929 'ppc64' ,
3030 'ppc64le' ,
31+ 'riscv' ,
3132 'x86' ,
3233 'x86_64' ,
3334]
@@ -558,6 +559,26 @@ def __init__(self):
558559 self ._ram = '2G'
559560
560561
562+ class RISCVQEMURunner (QEMURunner ):
563+
564+ def __init__ (self ):
565+ super ().__init__ ()
566+
567+ self .cmdline .append ('earlycon' )
568+ self ._default_kernel_path = Path ('arch/riscv/boot/Image' )
569+ self ._initrd_arch = 'riscv'
570+ self ._qemu_arch = 'riscv64'
571+
572+ deb_bios = '/usr/lib/riscv64-linux-gnu/opensbi/qemu/virt/fw_jump.elf'
573+ if 'BIOS' in os .environ :
574+ bios = os .environ ['BIOS' ]
575+ elif Path (deb_bios ).exists ():
576+ bios = deb_bios
577+ else :
578+ bios = 'default'
579+ self ._qemu_args += ['-bios' , bios , '-M' , 'virt' ]
580+
581+
561582class X86QEMURunner (QEMURunner ):
562583
563584 def __init__ (self ):
@@ -688,6 +709,7 @@ def parse_arguments():
688709 'ppc32_mac' : PowerPC32MacQEMURunner ,
689710 'ppc64' : PowerPC64QEMURunner ,
690711 'ppc64le' : PowerPC64LEQEMURunner ,
712+ 'riscv' : RISCVQEMURunner ,
691713 'x86' : X86QEMURunner ,
692714 'x86_64' : X8664QEMURunner ,
693715 }
You can’t perform that action at this time.
0 commit comments