From 14fad4344706a9b3fd44a45c80acd341db23e19f Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 17 Jun 2025 12:59:11 -0700 Subject: [PATCH] boot-qemu.py: Fix always downloading LoongArch firmware If the old firmware filename does not exist, the new firmware is always downloaded, even if it already exists. Remove the handling for the old to new transition so that the firmware is only downloaded when it is actually needed. Signed-off-by: Nathan Chancellor --- boot-qemu.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/boot-qemu.py b/boot-qemu.py index 38d7bcd..a592046 100755 --- a/boot-qemu.py +++ b/boot-qemu.py @@ -510,12 +510,8 @@ def __init__(self): self._initrd_arch = 'loongarch' bios = Path(utils.BOOT_UTILS, 'images', self._initrd_arch, - 'edk2-loongarch64-code.fd') + 'QEMU_EFI.fd') if not bios.exists(): - # Loongson renamed this in https://github.com/loongson/Firmware/commit/638906de6143283d86c70d80f4e9a30b50731c24 - # so download it to the new location if it does not exist already. - bios = bios.with_name('QEMU_EFI.fd') - bios.parent.mkdir(exist_ok=True, parents=True) firmware_url = f"https://github.com/loongson/Firmware/raw/main/LoongArchVirtMachine/{bios.name}" utils.green(