MCPcopy Create free account
hub / github.com/ClangBuiltLinux/boot-utils / __init__

Method __init__

boot-qemu.py:511–536  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

509
510class LoongArchQEMURunner(QEMURunner):
511 def __init__(self) -> None:
512 super().__init__()
513
514 self.cmdline.append('console=ttyS0,115200')
515 self._default_kernel_path = Path('arch/loongarch/boot/vmlinuz.efi')
516 self._initrd_arch = 'loongarch'
517
518 bios = Path(utils.BOOT_UTILS, 'images', self._initrd_arch, 'QEMU_EFI.fd')
519 if not bios.exists():
520 bios.parent.mkdir(exist_ok=True, parents=True)
521 firmware_url = (
522 f"https://github.com/loongson/Firmware/raw/main/LoongArchVirtMachine/{bios.name}"
523 )
524 utils.green(f"Downloading LoongArch firmware from {firmware_url}...")
525 curl_cmd = ['curl', '-LSs', '-o', bios, firmware_url]
526 subprocess.run(curl_cmd, check=True)
527
528 self._qemu_arch = 'loongarch64'
529 self._qemu_args += [
530 '-M', 'virt',
531 '-cpu', 'la464',
532 '-bios', bios,
533 '-no-reboot',
534 ] # fmt: off
535 self.memory = '2G'
536 self.smp = 2
537
538
539class M68KQEMURunner(QEMURunner):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
runMethod · 0.45

Tested by

no test coverage detected