Skip to content

Commit 4909dd4

Browse files
committed
boot-qemu.py: Add support for m68k
While clang cannot successfully compile an m68k kernel, I have hope that it one day will, so preemptively add support for it. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 04b984e commit 4909dd4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

boot-qemu.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'arm32_v7',
2323
'arm64',
2424
'arm64be',
25+
'm68k',
2526
'mips',
2627
'mipsel',
2728
'ppc32',
@@ -484,6 +485,17 @@ def supports_efi(self):
484485
return False
485486

486487

488+
class M68KQEMURunner(QEMURunner):
489+
490+
def __init__(self):
491+
super().__init__()
492+
493+
self.cmdline.append('console=ttyS0,115200')
494+
self._default_kernel_path = Path('vmlinux')
495+
self._initrd_arch = self._qemu_arch = 'm68k'
496+
self._qemu_args += ['-cpu', 'm68040', '-M', 'q800']
497+
498+
487499
class MIPSQEMURunner(QEMURunner):
488500

489501
def __init__(self):
@@ -715,6 +727,7 @@ def parse_arguments():
715727
'arm32_v7': ARMV7QEMURunner,
716728
'arm64': ARM64QEMURunner,
717729
'arm64be': ARM64BEQEMURunner,
730+
'm68k': M68KQEMURunner,
718731
'mips': MIPSQEMURunner,
719732
'mipsel': MIPSELQEMURunner,
720733
'ppc32': PowerPC32QEMURunner,

0 commit comments

Comments
 (0)