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
This commit is contained in:
spacecadet@purge.sh 2023-11-12 03:06:13 +00:00 committed by Efraim Flashner
parent 1c9908fad5
commit c67e8c12d8
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -983,36 +983,39 @@ (define-public ovmf
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