aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")