Skip to content

Commit 2032a4d

Browse files
authored
Merge pull request #122 from nathanchance/sparc64
2 parents 6c4b94c + 2a2b0f7 commit 2032a4d

9 files changed

+3310
-200
lines changed

boot-qemu.py

+14
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
'ppc64le',
3232
'riscv',
3333
's390',
34+
'sparc64',
3435
'x86',
3536
'x86_64',
3637
]
@@ -656,6 +657,17 @@ def __init__(self):
656657
self._qemu_args += ['-M', 's390-ccw-virtio']
657658

658659

660+
class Sparc64QEMURunner(QEMURunner):
661+
662+
def __init__(self):
663+
super().__init__()
664+
665+
self.cmdline.append('console=ttyS0')
666+
self._default_kernel_path = Path('arch/sparc/boot/image')
667+
self._initrd_arch = self._qemu_arch = 'sparc64'
668+
self._qemu_args += ['-M', 'sun4u', '-cpu', 'TI UltraSparc IIi']
669+
670+
659671
class X86QEMURunner(QEMURunner):
660672

661673
def __init__(self):
@@ -768,6 +780,7 @@ def guess_arch(kernel_arg):
768780
'ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI': 'ppc64le',
769781
'ELF 64-bit LSB executable, UCB RISC-V': 'riscv',
770782
'ELF 64-bit MSB executable, IBM S/390': 's390',
783+
'ELF 64-bit MSB executable, SPARC V9': 'sparc64',
771784
'ELF 32-bit LSB executable, Intel 80386': 'x86',
772785
'ELF 64-bit LSB executable, x86-64': 'x86_64',
773786
} # yapf: disable
@@ -877,6 +890,7 @@ def parse_arguments():
877890
'ppc64le': PowerPC64LEQEMURunner,
878891
'riscv': RISCVQEMURunner,
879892
's390': S390QEMURunner,
893+
'sparc64': Sparc64QEMURunner,
880894
'x86': X86QEMURunner,
881895
'x86_64': X8664QEMURunner,
882896
}

0 commit comments

Comments
 (0)