guix_mirror_bot pushed a commit to branch master
in repository guix.
commit e320469cf025c8adb2b7ffc16e5b0e0fb02be6eb
Author: Roman Scherer <[email protected]>
AuthorDate: Sat Mar 14 13:58:31 2026 +0100
gnu: ovmf-aarch64: Pad firmware to 64 MiB for QEMU compatibility.
QEMU's virt machine on AArch64 requires pflash devices to be exactly
64 MiB. The raw QEMU_EFI.fd produced by EDK2 is only ~2 MiB, causing
GRUB EFI tests to fail with:
cfi.pflash01 device requires 67108864 bytes, pflash0 block backend
provides 2097152 bytes
Pad the firmware file to match, as Nix does.
* gnu/packages/firmware.scm (ovmf-aarch64)[arguments]: Pad
ovmf_aarch64.bin to 64 MiB with truncate-file.
Change-Id: I589325294f264b0af69a9a0261c35d9a862e03c5
Signed-off-by: Efraim Flashner <[email protected]>
---
gnu/packages/firmware.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 24e1fc8362..74f6892735 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1253,11 +1253,15 @@ Virtual Machines. OVMF contains a sample UEFI firmware
for QEMU and KVM.")
#~(modify-phases #$phases
(replace 'install
(lambda _
- (let ((fmw (string-append #$output "/share/firmware")))
+ (let ((fmw (string-append #$output "/share/firmware"))
+ (build-dir
"Build/ArmVirtQemu-AARCH64/RELEASE_GCC/FV"))
(mkdir-p fmw)
- (copy-file (string-append "Build/ArmVirtQemu-AARCH64/"
- "RELEASE_GCC/FV/QEMU_EFI.fd")
- (string-append fmw
"/ovmf_aarch64.bin"))))))))))))
+ ;; QEMU's virt machine requires 64 MiB pflash devices on
+ ;; AArch64. Pad the firmware files to match.
+ (copy-file (string-append build-dir "/QEMU_EFI.fd")
+ (string-append fmw "/ovmf_aarch64.bin"))
+ (truncate-file (string-append fmw "/ovmf_aarch64.bin")
+ (* 64 1024 1024))))))))))))
(define-public ovmf-arm
(let ((base (make-ovmf-firmware "armhf")))