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))))) license:bsd-2 license:bsd-3 license:bsd-4)))))
(define-public ovmf-aarch64 (define-public ovmf-aarch64
(package (let ((toolchain-ver "GCC5"))
(inherit ovmf) (package
(name "ovmf-aarch64") (inherit ovmf)
(native-inputs (name "ovmf-aarch64")
(append (package-native-inputs ovmf) (native-inputs
(if (not (string-prefix? "aarch64" (%current-system))) (append (package-native-inputs ovmf)
`(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu")) (if (not (string-prefix? "aarch64" (%current-system)))
("cross-binutils" ,(cross-binutils "aarch64-linux-gnu"))) `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
'()))) ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu")))
(arguments '())))
(substitute-keyword-arguments (package-arguments ovmf) (arguments
((#:phases phases) (substitute-keyword-arguments (package-arguments ovmf)
#~(modify-phases #$phases ((#:phases phases)
#$@(if (string-prefix? "aarch64" (%current-system)) #~(modify-phases #$phases
'() #$@(if (string-prefix? "aarch64" (%current-system))
'((add-before 'configure 'set-env '()
(lambda _ #~((add-before 'configure 'set-env
(setenv "GCC49_AARCH64_PREFIX" "aarch64-linux-gnu-"))))) (lambda _
(replace 'build (setenv (string-append #$toolchain-ver "_AARCH64_PREFIX")
(lambda _ "aarch64-linux-gnu-")))))
(invoke "build" "-a" "AARCH64" "-t" "GCC49" (replace 'build
"-p" "ArmVirtPkg/ArmVirtQemu.dsc"))) (lambda _
(delete 'build-x64) (invoke "build" "-a" "AARCH64" "-t" #$toolchain-ver
(replace 'install "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
(lambda _ (delete 'build-x64)
(let ((fmw (string-append #$output "/share/firmware"))) (replace 'install
(mkdir-p fmw) (lambda _
(copy-file "Build/ArmVirtQemu-AARCH64/RELEASE_GCC49/FV/QEMU_EFI.fd" (let ((fmw (string-append #$output "/share/firmware")))
(string-append fmw "/ovmf_aarch64.bin"))))))))) (mkdir-p fmw)
(supported-systems %supported-systems))) (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 (define-public ovmf-arm
(package (package