Skip to content

Commit 04b984e

Browse files
committed
boot-qemu.py: Add support for s390
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 80ce9f4 commit 04b984e

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
@@ -29,6 +29,7 @@
2929
'ppc64',
3030
'ppc64le',
3131
'riscv',
32+
's390',
3233
'x86',
3334
'x86_64',
3435
]
@@ -579,6 +580,17 @@ def __init__(self):
579580
self._qemu_args += ['-bios', bios, '-M', 'virt']
580581

581582

583+
class S390QEMURunner(QEMURunner):
584+
585+
def __init__(self):
586+
super().__init__()
587+
588+
self._default_kernel_path = Path('arch/s390/boot/bzImage')
589+
self._initrd_arch = 's390'
590+
self._qemu_arch = 's390x'
591+
self._qemu_args += ['-M', 's390-ccw-virtio']
592+
593+
582594
class X86QEMURunner(QEMURunner):
583595

584596
def __init__(self):
@@ -710,6 +722,7 @@ def parse_arguments():
710722
'ppc64': PowerPC64QEMURunner,
711723
'ppc64le': PowerPC64LEQEMURunner,
712724
'riscv': RISCVQEMURunner,
725+
's390': S390QEMURunner,
713726
'x86': X86QEMURunner,
714727
'x86_64': X8664QEMURunner,
715728
}

0 commit comments

Comments
 (0)