mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-22 10:10:31 +02:00
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 <efraim@flashner.co.il>
This commit is contained in:
committed by
Efraim Flashner
parent
8cc2c81735
commit
e320469cf0
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user