From ca133a7c4d8bf07618b17a614b872fb8538da77b Mon Sep 17 00:00:00 2001 From: Juliana Sims Date: Tue, 25 Jul 2023 14:42:45 -0400 Subject: gnu: Add rvvm. * gnu/packages/virtualization.scm (rvvm): New variable. Co-authored-by: Efraim Flashner Signed-off-by: Efraim Flashner --- gnu/packages/virtualization.scm | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 729c61de8d..db7df83524 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 Ekaitz Zarraga ;;; Copyright © 2022 Arun Isaac ;;; Copyright © 2022 Zhu Zihao +;;; Copyright © 2023 Juliana Sims ;;; ;;; This file is part of GNU Guix. ;;; @@ -1126,6 +1127,57 @@ Guix to build virtual machines.") Debian or a derivative using @command{debootstrap}.") (license license:gpl2+))) +(define-public rvvm + (package + (name "rvvm") + (version "0.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LekKit/RVVM") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ldabcrmpa044bahpqa6ymwbhhwy69slh77f0m3421sq6j50l06p")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + ;; See src/rvjit/rvjit.h for list of architectures. + #~(#$@(if (or (target-x86?) + (target-arm?)) + #~'() + #~(list "-DRVVM_USE_JIT=NO"))) + #:modules `((srfi srfi-26) + (guix build utils) + (guix build cmake-build-system)) + #:phases + #~(modify-phases %standard-phases + ;; Install phase inspired by the Makefile. + (replace 'install + (lambda _ + (let ((src "../source/src/") + (incl (string-append #$output "/include/rvvm/"))) + (install-file "rvvm" (string-append #$output "/bin")) + (for-each + (cut install-file <> (string-append #$output "/lib")) + (find-files "." "\\.(so|a)$")) + (install-file (string-append src "rvvmlib.h") incl) + (for-each + (cut install-file <> (string-append incl "devices")) + (find-files (string-append src "devices") "\\.h$")))))) + #:tests? #f)) ; no tests + (home-page "https://github.com/LekKit/RVVM") + (synopsis "RISC-V virtual machine") + (description + "RVVM is a RISC-V CPU and system software implementation written in C. It +supports the entire RV64GC ISA, and it passes compliance tests for both RV64 and +RV32. OpenSBI, U-Boot, and custom firmwares boot and execute properly. It is +capable of running Linux, FreeBSD, OpenBSD, Haiku, and other OSes. Furthermore, +it emulates a variety of hardware and peripherals.") + (license (list license:gpl3+ license:mpl2.0)))) + (define-public spike (package (name "spike") -- cgit v1.2.3 ...Ludovic Courtès 2021-11-25daemon: Read unsigned nar size and download size from substituter....Ludovic Courtès 2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-11-16daemon: Do not deduplicate files smaller than 8 KiB....Ludovic Courtès 2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-10-28store: 'map/accumulate-builds' handler checks the store received....Ludovic Courtès 2021-09-17Merge branch 'master' into core-updates-frozen...Marius Bakke 2021-09-15store: 'map/accumulate-builds' processes the whole list in case of cutoff....Ludovic Courtès 2021-07-05tests: Fix typo in 'tests/store.scm'....Ludovic Courtès 2021-06-08store: Remove 'references/substitutes'....Ludovic Courtès 2021-03-18tests: Make the STORE test more robust in a "pure" environment....Leo Famulari 2021-01-22store: Add 'find-roots' RPC....Ludovic Courtès