mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: Add ovmf-aarch64.
* gnu/packages/firmware.scm (ovmf-aarch64): New variable.
This commit is contained in:
parent
ff3fd83969
commit
cb97be5f83
1 changed files with 35 additions and 0 deletions
|
@ -303,6 +303,41 @@ (define-public ovmf
|
||||||
(license (list license:expat
|
(license (list license:expat
|
||||||
license:bsd-2 license:bsd-3 license:bsd-4))))
|
license:bsd-2 license:bsd-3 license:bsd-4))))
|
||||||
|
|
||||||
|
(define-public ovmf-aarch64
|
||||||
|
(package
|
||||||
|
(inherit ovmf)
|
||||||
|
(name "ovmf-aarch64")
|
||||||
|
(native-inputs
|
||||||
|
`(,@(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
|
||||||
|
(add-before 'configure 'set-env
|
||||||
|
(lambda _
|
||||||
|
,@(if (not (string-prefix? "aarch64" (%current-system)))
|
||||||
|
`((setenv "GCC49_AARCH64_PREFIX" "aarch64-linux-gnu-"))
|
||||||
|
'())
|
||||||
|
#t))
|
||||||
|
(replace 'build
|
||||||
|
(lambda _
|
||||||
|
(invoke "build" "-a" "AARCH64" "-t" "GCC49"
|
||||||
|
"-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
|
||||||
|
(delete 'build-x64)
|
||||||
|
(replace 'install
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(fmw (string-append out "/share/firmware")))
|
||||||
|
(mkdir-p fmw)
|
||||||
|
(copy-file "Build/ArmVirtQemu-AARCH64/RELEASE_GCC49/FV/QEMU_EFI.fd"
|
||||||
|
(string-append fmw "/ovmf_aarch64.bin"))
|
||||||
|
#t)))))))
|
||||||
|
(supported-systems %supported-systems)))
|
||||||
|
|
||||||
(define* (make-arm-trusted-firmware platform #:optional (arch "aarch64"))
|
(define* (make-arm-trusted-firmware platform #:optional (arch "aarch64"))
|
||||||
(package
|
(package
|
||||||
(name (string-append "arm-trusted-firmware-" platform))
|
(name (string-append "arm-trusted-firmware-" platform))
|
||||||
|
|
Loading…
Reference in a new issue