|
24 | 24 | 'arm64be', |
25 | 25 | 'mips', |
26 | 26 | 'mipsel', |
| 27 | + 'ppc32', |
| 28 | + 'ppc32_mac', |
| 29 | + 'ppc64', |
| 30 | + 'ppc64le', |
27 | 31 | 'x86', |
28 | 32 | 'x86_64', |
29 | 33 | ] |
@@ -496,6 +500,64 @@ def __init__(self): |
496 | 500 | self._initrd_arch = self._qemu_arch = 'mipsel' |
497 | 501 |
|
498 | 502 |
|
| 503 | +class PowerPC32QEMURunner(QEMURunner): |
| 504 | + |
| 505 | + def __init__(self): |
| 506 | + super().__init__() |
| 507 | + |
| 508 | + self.cmdline.append('console=ttyS0') |
| 509 | + self._default_kernel_path = Path('arch/powerpc/boot/uImage') |
| 510 | + self._initrd_arch = 'ppc32' |
| 511 | + self._machine = 'bamboo' |
| 512 | + self._qemu_arch = 'ppc' |
| 513 | + self._ram = '128m' |
| 514 | + |
| 515 | + def run(self): |
| 516 | + self._qemu_args += ['-machine', self._machine] |
| 517 | + |
| 518 | + super().run() |
| 519 | + |
| 520 | + |
| 521 | +class PowerPC32MacQEMURunner(PowerPC32QEMURunner): |
| 522 | + |
| 523 | + def __init__(self): |
| 524 | + super().__init__() |
| 525 | + |
| 526 | + self._default_kernel_path = Path('vmlinux') |
| 527 | + self._machine = 'mac99' |
| 528 | + |
| 529 | + |
| 530 | +class PowerPC64QEMURunner(QEMURunner): |
| 531 | + |
| 532 | + def __init__(self): |
| 533 | + super().__init__() |
| 534 | + |
| 535 | + self._default_kernel_path = Path('vmlinux') |
| 536 | + self._initrd_arch = self._qemu_arch = 'ppc64' |
| 537 | + self._qemu_args += [ |
| 538 | + '-cpu', 'power8', |
| 539 | + '-machine', 'pseries', |
| 540 | + '-vga', 'none', |
| 541 | + ] # yapf: disable |
| 542 | + self._ram = '1G' |
| 543 | + |
| 544 | + |
| 545 | +class PowerPC64LEQEMURunner(QEMURunner): |
| 546 | + |
| 547 | + def __init__(self): |
| 548 | + super().__init__() |
| 549 | + |
| 550 | + self._default_kernel_path = Path('arch/powerpc/boot/zImage.epapr') |
| 551 | + self._initrd_arch = 'ppc64le' |
| 552 | + self._qemu_arch = 'ppc64' |
| 553 | + self._qemu_args += [ |
| 554 | + '-device', 'ipmi-bmc-sim,id=bmc0', |
| 555 | + '-device', 'isa-ipmi-bt,bmc=bmc0,irq=10', |
| 556 | + '-machine', 'powernv', |
| 557 | + ] # yapf: disable |
| 558 | + self._ram = '2G' |
| 559 | + |
| 560 | + |
499 | 561 | class X86QEMURunner(QEMURunner): |
500 | 562 |
|
501 | 563 | def __init__(self): |
@@ -622,6 +684,10 @@ def parse_arguments(): |
622 | 684 | 'arm64be': ARM64BEQEMURunner, |
623 | 685 | 'mips': MIPSQEMURunner, |
624 | 686 | 'mipsel': MIPSELQEMURunner, |
| 687 | + 'ppc32': PowerPC32QEMURunner, |
| 688 | + 'ppc32_mac': PowerPC32MacQEMURunner, |
| 689 | + 'ppc64': PowerPC64QEMURunner, |
| 690 | + 'ppc64le': PowerPC64LEQEMURunner, |
625 | 691 | 'x86': X86QEMURunner, |
626 | 692 | 'x86_64': X8664QEMURunner, |
627 | 693 | } |
|
0 commit comments