Subject: [PATCH 7/9] gnu: ovmf-riscv64: Adjust the installed firmware.

From: Efraim Flashner <[email-masked]>
Date: Fri, 21 Mar 2025 10:53:08 +0200

* gnu/packages/firmware.scm (ovmf-riscv64)[arguments]: Adjust the
'install phase to truncate the files to their expected lengths.

Change-Id: Idb524a7e2ca8b8a8fe8a70a893f57a13ff1e0b56
---
 gnu/packages/firmware.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index c8220fe3d66..0becefb3b08 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1234,6 +1234,9 @@ (define-public ovmf-riscv64
                    (let ((fmw (string-append #$output "/share/firmware")))
                     (mkdir-p fmw)
                     (with-directory-excursion "Build/RiscVVirtQemu/RELEASE_GCC/FV"
+                      ;; Make the files the desired length and then install them
+                      (truncate-file "RISCV_VIRT_CODE.fd" (* 32 1024 1024))
+                      (truncate-file "RISCV_VIRT_VARS.fd" (* 32 1024 1024))
                       (install-file "RISCV_VIRT_CODE.fd" fmw)
                       (install-file "RISCV_VIRT_VARS.fd" fmw))))))))))))
 
-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted