Subject: [bug#67119] [PATCH 2/4] gnu: ovmf: Add OVMF_CODE and OVMF_VARS files.

From: [email-masked]
Date: Sun, 12 Nov 2023 03:02:17 +0000

Add OVMF_CODE.fd and OVMF_VARS.fs to outputs as ovmf_code_arch.bin and
ovmf_vars_arch.bin, respectively, for both ia32 and x64 architectures.
---
  gnu/packages/firmware.scm | 17 +++++++++++------
  1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index fd8b6bb8f0..53b89e4d90 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -954,12 +954,17 @@ (define-public ovmf
                  (let ((fmw (string-append #$output "/share/firmware"))
                        (toolchain-ver #$toolchain-ver))
                    (mkdir-p fmw)
-                  (copy-file (string-append "Build/OvmfIa32/RELEASE_" 
toolchain-ver "/FV/OVMF.fd")
-                             (string-append fmw "/ovmf_ia32.bin"))
-                  #$@(if (string=? "x86_64-linux" (%current-system))
-                         '((copy-file (string-append 
"Build/OvmfX64/RELEASE_" toolchain-ver "/FV/OVMF.fd")
-                                      (string-append fmw 
"/ovmf_x64.bin")))
-                         '())))))))
+                  (for-each
+                    (lambda (file)
+                      (copy-file (string-append 
"Build/OvmfIa32/RELEASE_" toolchain-ver "/FV/" file ".fd")
+                                 (string-append fmw "/" 
(string-downcase file) "_ia32.bin"))
+                      #$@(if (string=? "x86_64-linux" 
(%current-system))
+                           '((copy-file (string-append 
"Build/OvmfX64/RELEASE_" toolchain-ver "/FV/" file ".fd")
+                                        (string-append fmw "/" 
(string-downcase file) "_x64.bin")))
+                           '()))
+                    (list "OVMF"
+                          "OVMF_CODE"
+                          "OVMF_VARS"))))))))
        (native-inputs
         `(("acpica" ,acpica)
           ("gcc@5" ,gcc-5)
-- 
2.41.0