mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 22:26:40 -05:00
gnu: Add ovmf-riscv64.
* gnu/packages/firmware.scm (ovmf-riscv64): New variable. Change-Id: I483bc4496d7874cc0e9983de36cfc7a90ef7591c
This commit is contained in:
parent
7a7ba2d075
commit
d542593092
1 changed files with 38 additions and 0 deletions
|
@ -1040,6 +1040,44 @@ (define-public ovmf-arm
|
|||
(string-append fmw "/ovmf_arm.bin")))))))))
|
||||
(supported-systems %supported-systems))))
|
||||
|
||||
(define-public ovmf-riscv64
|
||||
(let ((toolchain-ver "GCC5"))
|
||||
(package
|
||||
(inherit ovmf)
|
||||
(name "ovmf-riscv64")
|
||||
(native-inputs
|
||||
(append (package-native-inputs ovmf)
|
||||
(if (not (string-prefix? "riscv64" (%current-system)))
|
||||
`(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu"))
|
||||
("cross-binutils" ,(cross-binutils "riscv64-linux-gnu")))
|
||||
'())))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments ovmf)
|
||||
((#:phases phases)
|
||||
#~(modify-phases #$phases
|
||||
#$@(if (string-prefix? "riscv64" (%current-system))
|
||||
'()
|
||||
#~((add-before 'configure 'set-env
|
||||
(lambda _
|
||||
(setenv (string-append #$toolchain-ver "_RISCV64_PREFIX")
|
||||
"riscv64-linux-gnu-")))))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke "build" "-a" "RISCV64" "-t" #$toolchain-ver
|
||||
"-p" "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc")))
|
||||
(delete 'build-x64)
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(let ((fmw (string-append #$output "/share/firmware")))
|
||||
(mkdir-p fmw)
|
||||
(copy-file (string-append "Build/RiscVVirtQemu/RELEASE_"
|
||||
#$toolchain-ver "/FV/RISCV_VIRT_CODE.fd")
|
||||
(string-append fmw "/RISCV_VIRT_CODE.fd"))
|
||||
(copy-file (string-append "Build/RiscVVirtQemu/RELEASE_"
|
||||
#$toolchain-ver "/FV/RISCV_VIRT_VARS.fd")
|
||||
(string-append fmw "/RISCV_VIRT_VARS.fd")))))))))
|
||||
(supported-systems %supported-systems))))
|
||||
|
||||
(define* (make-arm-trusted-firmware platform
|
||||
#:key (triplet "aarch64-linux-gnu"))
|
||||
(let ((native-build? (lambda ()
|
||||
|
|
Loading…
Reference in a new issue