Skip to content

Commit

Permalink
Merge pull request #122 from nathanchance/sparc64
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanchance authored Nov 19, 2024
2 parents 6c4b94c + 2a2b0f7 commit 2032a4d
Show file tree
Hide file tree
Showing 9 changed files with 3,310 additions and 200 deletions.
14 changes: 14 additions & 0 deletions boot-qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'ppc64le',
'riscv',
's390',
'sparc64',
'x86',
'x86_64',
]
Expand Down Expand Up @@ -656,6 +657,17 @@ def __init__(self):
self._qemu_args += ['-M', 's390-ccw-virtio']


class Sparc64QEMURunner(QEMURunner):

def __init__(self):
super().__init__()

self.cmdline.append('console=ttyS0')
self._default_kernel_path = Path('arch/sparc/boot/image')
self._initrd_arch = self._qemu_arch = 'sparc64'
self._qemu_args += ['-M', 'sun4u', '-cpu', 'TI UltraSparc IIi']


class X86QEMURunner(QEMURunner):

def __init__(self):
Expand Down Expand Up @@ -768,6 +780,7 @@ def guess_arch(kernel_arg):
'ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI': 'ppc64le',
'ELF 64-bit LSB executable, UCB RISC-V': 'riscv',
'ELF 64-bit MSB executable, IBM S/390': 's390',
'ELF 64-bit MSB executable, SPARC V9': 'sparc64',
'ELF 32-bit LSB executable, Intel 80386': 'x86',
'ELF 64-bit LSB executable, x86-64': 'x86_64',
} # yapf: disable
Expand Down Expand Up @@ -877,6 +890,7 @@ def parse_arguments():
'ppc64le': PowerPC64LEQEMURunner,
'riscv': RISCVQEMURunner,
's390': S390QEMURunner,
'sparc64': Sparc64QEMURunner,
'x86': X86QEMURunner,
'x86_64': X8664QEMURunner,
}
Expand Down
Loading

0 comments on commit 2032a4d

Please sign in to comment.