summaryrefslogtreecommitdiff
path: root/gnu/packages/firmware.scm
diff options
context:
space:
mode:
authorspacecadet@purge.sh <spacecadet@purge.sh>2023-11-12 03:06:13 +0000
committerEfraim Flashner <efraim@flashner.co.il>2023-12-19 16:27:13 +0200
commitc67e8c12d85ef2b88156dadeb5259e6d25137e3e (patch)
tree7047794fd0e061e832a7ca0884b2b387f40bb404 /gnu/packages/firmware.scm
parent1c9908fad5a9a9a3127c98148697bc5888af1cfc (diff)
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
Diffstat (limited to 'gnu/packages/firmware.scm')
-rw-r--r--gnu/packages/firmware.scm63
1 files 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