summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-12-25 13:41:13 +0100
committerMarius Bakke <marius@gnu.org>2022-12-25 14:15:59 +0100
commitc8e836991df304f59ab713ce12a38490e33e169b (patch)
tree71112339000532fd22f49dee43c427f24fd4d2ef
parent699aef4bc6500cf2fff75be803c44dc9e34edc3e (diff)
gnu: Add opensbi-qemu.
* gnu/packages/firmware.scm (opensbi-qemu): New variable.
-rw-r--r--gnu/packages/firmware.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index b231fd7659..4d4fc8fe23 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -34,6 +34,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
@@ -476,6 +477,29 @@ executing in M-mode.")
(define-public opensbi-generic
(make-opensbi-package "generic" "opensbi-generic"))
+(define-public opensbi-qemu
+ (package
+ (inherit opensbi-generic)
+ (name "opensbi-qemu")
+ (native-inputs '())
+ (inputs (list opensbi-generic))
+ (build-system trivial-build-system)
+ (arguments
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules ((guix build utils)))
+ (let ((opensbi-riscv64 (search-input-file %build-inputs
+ "fw_dynamic.bin"))
+ (out (string-append #$output "/share/qemu")))
+ (mkdir-p out)
+ (symlink opensbi-riscv64
+ (string-append
+ out "/opensbi-riscv64-generic-fw_dynamic.bin"))))))
+ (synopsis "OpenSBI firmware files for QEMU")
+ (description
+ "This package contains OpenSBI firmware files for use with QEMU.")))
+
(define-public seabios
(package
(name "seabios")