guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/09: gnu: ovmf-aarch64: Update to use GCC5.


From: guix-commits
Subject: 05/09: gnu: ovmf-aarch64: Update to use GCC5.
Date: Tue, 19 Dec 2023 09:32:46 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit c67e8c12d85ef2b88156dadeb5259e6d25137e3e
Author: spacecadet@purge.sh <spacecadet@purge.sh>
AuthorDate: Sun Nov 12 03:06:13 2023 +0000

    gnu: ovmf-aarch64: Update to use GCC5.
    
    * gnu/packages/firmware.scm (ovmf-aarch64): Updating OVMF to 202308
    requires GCC5, packages inheriting from ovmf also need to be updated.
    
    Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
    Change-Id: Iccd674f82c2f0160fa8097a09d10154be9736042
---
 gnu/packages/firmware.scm | 63 +++++++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 4ee5dc5523..cb3ca63bde 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -983,36 +983,39 @@ Virtual Machines.  OVMF contains a sample UEFI firmware 
for QEMU and KVM.")
                      license:bsd-2 license:bsd-3 license:bsd-4)))))
 
 (define-public ovmf-aarch64
-  (package
-    (inherit ovmf)
-    (name "ovmf-aarch64")
-    (native-inputs
-     (append (package-native-inputs ovmf)
-             (if (not (string-prefix? "aarch64" (%current-system)))
-                 `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
-                   ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu")))
-                 '())))
-    (arguments
-     (substitute-keyword-arguments (package-arguments ovmf)
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            #$@(if (string-prefix? "aarch64" (%current-system))
-                   '()
-                   '((add-before 'configure 'set-env
-                       (lambda _
-                         (setenv "GCC49_AARCH64_PREFIX" 
"aarch64-linux-gnu-")))))
-            (replace 'build
-              (lambda _
-                (invoke "build" "-a" "AARCH64" "-t" "GCC49"
-                        "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
-            (delete 'build-x64)
-            (replace 'install
-              (lambda _
-                (let ((fmw (string-append #$output "/share/firmware")))
-                  (mkdir-p fmw)
-                  (copy-file 
"Build/ArmVirtQemu-AARCH64/RELEASE_GCC49/FV/QEMU_EFI.fd"
-                             (string-append fmw "/ovmf_aarch64.bin")))))))))
-    (supported-systems %supported-systems)))
+  (let ((toolchain-ver "GCC5"))
+    (package
+      (inherit ovmf)
+      (name "ovmf-aarch64")
+      (native-inputs
+       (append (package-native-inputs ovmf)
+               (if (not (string-prefix? "aarch64" (%current-system)))
+                   `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
+                     ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu")))
+                   '())))
+      (arguments
+       (substitute-keyword-arguments (package-arguments ovmf)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              #$@(if (string-prefix? "aarch64" (%current-system))
+                     '()
+                     #~((add-before 'configure 'set-env
+                          (lambda _
+                            (setenv (string-append #$toolchain-ver 
"_AARCH64_PREFIX")
+                                    "aarch64-linux-gnu-")))))
+              (replace 'build
+                (lambda _
+                  (invoke "build" "-a" "AARCH64" "-t" #$toolchain-ver
+                          "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
+              (delete 'build-x64)
+              (replace 'install
+                (lambda _
+                  (let ((fmw (string-append #$output "/share/firmware")))
+                    (mkdir-p fmw)
+                    (copy-file (string-append 
"Build/ArmVirtQemu-AARCH64/RELEASE_"
+                                              #$toolchain-ver 
"/FV/QEMU_EFI.fd")
+                               (string-append fmw "/ovmf_aarch64.bin")))))))))
+      (supported-systems %supported-systems))))
 
 (define-public ovmf-arm
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]