[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: gnu: Add ovmf-riscv64.
From: |
guix-commits |
Subject: |
08/09: gnu: Add ovmf-riscv64. |
Date: |
Tue, 19 Dec 2023 09:32:46 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit d542593092d93667cee28ba5b8bbca9d1469985e
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Dec 19 14:05:57 2023 +0200
gnu: Add ovmf-riscv64.
* gnu/packages/firmware.scm (ovmf-riscv64): New variable.
Change-Id: I483bc4496d7874cc0e9983de36cfc7a90ef7591c
---
gnu/packages/firmware.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 222eec07e8..3bb6eff1ec 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1040,6 +1040,44 @@ Virtual Machines. OVMF contains a sample UEFI firmware
for QEMU and KVM.")
(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 ()
- branch master updated (fa92a7c2fe -> a512bbd23a), guix-commits, 2023/12/19
- 06/09: gnu: ovmf-arm: Update to use GCC5., guix-commits, 2023/12/19
- 03/09: gnu: ovmf: Update to 202308., guix-commits, 2023/12/19
- 05/09: gnu: ovmf-aarch64: Update to use GCC5., guix-commits, 2023/12/19
- 07/09: gnu: ovmf: Build with newer gcc., guix-commits, 2023/12/19
- 02/09: gnu: qemu: Update to 8.1.3., guix-commits, 2023/12/19
- 04/09: gnu: ovmf: Add OVMF_CODE and OVMF_VARS files., guix-commits, 2023/12/19
- 01/09: gnu: composer-classloader: Use copy-build-system., guix-commits, 2023/12/19
- 08/09: gnu: Add ovmf-riscv64.,
guix-commits <=
- 09/09: gnu: ovmf: Set target to #f., guix-commits, 2023/12/19