summaryrefslogtreecommitdiff
path: root/gnu/packages/firmware.scm
diff options
context:
space:
mode:
authorspacecadet@purge.sh <spacecadet@purge.sh>2023-11-12 03:07:35 +0000
committerEfraim Flashner <efraim@flashner.co.il>2023-12-19 16:27:13 +0200
commitedb794bbd45a3e290c678d3f50863278b8f09799 (patch)
tree86114dab75a4a883b5e5fc767f312e65da34f692 /gnu/packages/firmware.scm
parentc67e8c12d85ef2b88156dadeb5259e6d25137e3e (diff)
gnu: ovmf-arm: Update to use GCC5.
* gnu/packages/firmware.scm (ovmf-arm): 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: I3a7b3f450e0da39129e7cffce7482b8e391e3858
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 cb3ca63bde..5a67095235 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1018,36 +1018,39 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.")
(supported-systems %supported-systems))))
(define-public ovmf-arm
- (package
- (inherit ovmf)
- (name "ovmf-arm")
- (native-inputs
- (append (package-native-inputs ovmf)
- (if (not (string-prefix? "armhf" (%current-system)))
- `(("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"))
- ("cross-binutils" ,(cross-binutils "arm-linux-gnueabihf")))
- '())))
- (arguments
- (substitute-keyword-arguments (package-arguments ovmf)
- ((#:phases phases)
- #~(modify-phases #$phases
- #$@(if (string-prefix? "armhf" (%current-system))
- '()
- '((add-before 'configure 'set-env
- (lambda _
- (setenv "GCC49_ARM_PREFIX" "arm-linux-gnueabihf-")))))
- (replace 'build
- (lambda _
- (invoke "build" "-a" "ARM" "-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-ARM/RELEASE_GCC49/FV/QEMU_EFI.fd"
- (string-append fmw "/ovmf_arm.bin")))))))))
- (supported-systems %supported-systems)))
+ (let ((toolchain-ver "GCC5"))
+ (package
+ (inherit ovmf)
+ (name "ovmf-arm")
+ (native-inputs
+ (append (package-native-inputs ovmf)
+ (if (not (string-prefix? "armhf" (%current-system)))
+ `(("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"))
+ ("cross-binutils" ,(cross-binutils "arm-linux-gnueabihf")))
+ '())))
+ (arguments
+ (substitute-keyword-arguments (package-arguments ovmf)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ #$@(if (string-prefix? "armhf" (%current-system))
+ '()
+ #~((add-before 'configure 'set-env
+ (lambda _
+ (setenv (string-append #$toolchain-ver "_ARM_PREFIX")
+ "arm-linux-gnueabihf-")))))
+ (replace 'build
+ (lambda _
+ (invoke "build" "-a" "ARM" "-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-ARM/RELEASE_"
+ #$toolchain-ver "/FV/QEMU_EFI.fd")
+ (string-append fmw "/ovmf_arm.bin")))))))))
+ (supported-systems %supported-systems))))
(define* (make-arm-trusted-firmware platform
#:key (triplet "aarch64-linux-gnu"))