From c8e836991df304f59ab713ce12a38490e33e169b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Dec 2022 13:41:13 +0100 Subject: gnu: Add opensbi-qemu. * gnu/packages/firmware.scm (opensbi-qemu): New variable. --- gnu/packages/firmware.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gnu/packages/firmware.scm') 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") -- cgit 1.4.1