From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages. Resent-From: Juliana Sims Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, ludo@gnu.org, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Thu, 27 Jul 2023 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64907@debbugs.gnu.org Cc: Juliana Sims , Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian Received: via spool by submit@debbugs.gnu.org id=B.16904925231341 (code B ref -1); Thu, 27 Jul 2023 21:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jul 2023 21:15:23 +0000 Received: from localhost ([127.0.0.1]:43232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8KQ-0000LY-EM for submit@debbugs.gnu.org; Thu, 27 Jul 2023 17:15:22 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8KM-0000LE-Vf for submit@debbugs.gnu.org; Thu, 27 Jul 2023 17:15:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP8K8-00055i-3D for guix-patches@gnu.org; Thu, 27 Jul 2023 17:15:05 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP8K4-00012T-1f for guix-patches@gnu.org; Thu, 27 Jul 2023 17:15:02 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2C5E5FF803; Thu, 27 Jul 2023 21:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=incana.org; s=gm1; t=1690492494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2sZlJN+3DdmqsmiwW2tq3IrYx0wqr1Ys3QF14HnKb9g=; b=Kngns+9FmsO/gog7KJ8AxBZAR4I5SF3JVXnj4XlR0loBcA2Kh+NQrc83j4yoaybZqAhkIi TiP2bHE94pHxEHCX42SlSgOHw35HWfy3GW4qdHJsPwgrk3xFAdhUdNwYuY0+6DyNRLaF8a TP2tL8f+c1L0NvWyP8mFnfJoQxsXAxBk8pE07xGpvscVXZUg6eZdqgs0gUMH3LcG0KzCUO bmo+DYj1zOz/f4VmXMGN2buhtJBM0epqZnMCPwg73cibbwhexKAArrlyQ/cBi46I/VoTVp lpiYqMReb01karg8tD5T0IV5jhz0FoJnVai9kzDeOIKEBp73xDlhjqUax+IBRw== From: Juliana Sims Date: Thu, 27 Jul 2023 16:13:57 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: juli@incana.org Received-SPF: pass client-ip=217.70.183.199; envelope-from=juli@incana.org; helo=relay9-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hello, These patches create specialized U-Boot and OpenSBI packages to use with RVVM by applying RVVM's author's patches to those projects. Additionally, they build this patched version of U-Boot into OpenSBI's `fw_payload.bin`, mimicking the binary release from RVVM. The RVVM author claims faster execution than QEMU. As such, the ultimate goal of these packages is to create a system service which will allow developers to easily run Guix under RVVM for the purpose of development, much like hurd-vm-service-type provides a way to run Hurd under Guix. However, that's a larger project, and getting these packaged as they are will already prove useful. Anyone wishing to use them can simply run: ``` guix shell --pure rvvm opensbi-rvvm rvvm /gnu/store/-opensbi-rvvm-/fw_payload.bin -i .img [...] ``` I have tested these packages with the FreeBSD-13.2 RV64 raw disk image, so I know they run successfully. It's worth noting that opensbi-generic works fine with RVVM. However, it does not provide `fw_payload.bin` - only `fw_jump.bin` - so this version provides more flexibility. That said, opensbi-rvvm is 5.3 MB compared to opensbi-generic's 1.3 MB. Because of that, I'm ambivalent about adding it. I leave the decision on whether or not to include it entirely up to others; there's no sense in throwing away work I already did if it may be useful. It may be worth noting that RVVM also has patches for the Linux kernel. However, upon inspection they seem to primarily be concerned with decreasing binary size, which can be worked around if needed. The linux-libre-riscv64-generic package should work just fine, but this has not been tested. Thanks, Juli Juliana Sims (2): gnu: Add u-boot-rvvm. gnu: Add opensbi-rvvm. gnu/packages/bootloaders.scm | 23 +++++++ gnu/packages/firmware.scm | 32 +++++++++ .../patches/opensbi-rvvm-lowram-fdt.patch | 21 ++++++ .../patches/u-boot-rvvm-support.patch | 67 +++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100644 gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch create mode 100644 gnu/packages/patches/u-boot-rvvm-support.patch base-commit: 35c8d631d2bd63c64e863b5509f29fdcb7f856e6 -- 2.41.0 From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 1/2] gnu: Add u-boot-rvvm. Resent-From: Juliana Sims Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, ludo@gnu.org, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Thu, 27 Jul 2023 21:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64907@debbugs.gnu.org Cc: Juliana Sims , Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.16904927701738 (code B ref 64907); Thu, 27 Jul 2023 21:20:01 +0000 Received: (at 64907) by debbugs.gnu.org; 27 Jul 2023 21:19:30 +0000 Received: from localhost ([127.0.0.1]:43242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8OQ-0000Ry-8v for submit@debbugs.gnu.org; Thu, 27 Jul 2023 17:19:30 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8ON-0000Ri-BY for 64907@debbugs.gnu.org; Thu, 27 Jul 2023 17:19:29 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 16F7C1C0004; Thu, 27 Jul 2023 21:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=incana.org; s=gm1; t=1690492760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MVEdPBRf5ec8//QdowTjNk2fxzuUQKtzL83kkqcCZp8=; b=CBEVGCU+oJVgn4grIQxtv7be7gmOVSyYuCKPWjvDv0s4yJ0Fqe5FIudL+FdZ7OcCCayGvd 0MtFMOCt6Izz271wzrWhqIxHg0kRBR5DdocOcxtSfujHQT+t6bHi8//NpaLtL2PJ/dogRa GT/xUD8e1td2SpJvsJ8t/5dyK8oH/IXtAf9IbK5O1lRAnzChQ9lxBaoz8+AuL+e/q/mJ40 8Qr+0IhCFPAQhM2U13BztazxAhJwdvKKtmjsUkVMytz2iY4K6qr2ZB/WNPAnC7JZHEH4bc SFWlDTX9PqKTvPGpBStbdzcJQwQx+6QuxFVnR7wz23PgGrv2zP+x+3utVCOBPw== From: Juliana Sims Date: Thu, 27 Jul 2023 17:18:57 -0400 Message-ID: <62cefdc5d6a4b0e3d6e611a6b6541f00acc19d9f.1690488628.git.juli@incana.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juli@incana.org X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/bootloaders.scm (%u-boot-rvvm-support-patch, u-boot-rvvm): New symbol. * gnu/packages/patches/u-boot-rvvm-support.patch: New patch. --- gnu/packages/bootloaders.scm | 23 +++++++ .../patches/u-boot-rvvm-support.patch | 67 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 gnu/packages/patches/u-boot-rvvm-support.patch diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 38eb1d104f..5f12d324e8 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2021 Stefan ;;; Copyright © 2022, 2023 Maxim Cournoyer +;;; Copyright © 2023 Juliana Sims ;;; ;;; This file is part of GNU Guix. ;;; @@ -645,6 +646,15 @@ (define %u-boot-rk3399-enable-emmc-phy-patch ;; https://lists.denx.de/pipermail/u-boot/2021-November/466329.html (search-patch "u-boot-rk3399-enable-emmc-phy.patch")) +(define %u-boot-rvvm-support-patch + ;; Patch to support NVMe and RVVM board properly in U-Boot + ;; - Enables NVMe PCI support & booting from it + ;; - Enables framebuffer driver, passes it as EFI FB + ;; - Enables Realtek RTL8169 driver + ;; - Get rid of DHCP boot, it is confusing and not helpful + ;; https://github.com/LekKit/patches-misc/blob/ef2bb2bc6e37f87f3af4f9d9c8b69f76408620a7/uboot/uboot_rvvm_support.patch + (search-patch "u-boot-rvvm-support.patch")) + (define u-boot (package (name "u-boot") @@ -1173,6 +1183,19 @@ (define-public u-boot-qemu-riscv64 (define-public u-boot-qemu-riscv64-smode (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) +(define-public u-boot-rvvm + (let ((base (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu" + #:append-description + "This U-Boot is built for @code{rvvm}. It is also compatible +with @code{qemu}, but adds patches from the @code{rvvm} authors."))) + (package + (inherit base) + (name "u-boot-rvvm") + (source (origin + (inherit (package-source base)) + (patches (cons %u-boot-rvvm-support-patch + (origin-patches (package-source base))))))))) + (define-public u-boot-sandbox (let ((base (make-u-boot-package "sandbox" #f ;build for the native system diff --git a/gnu/packages/patches/u-boot-rvvm-support.patch b/gnu/packages/patches/u-boot-rvvm-support.patch new file mode 100644 index 0000000000..1e62a2d61d --- /dev/null +++ b/gnu/packages/patches/u-boot-rvvm-support.patch @@ -0,0 +1,67 @@ +Patch to support NVMe and RVVM board properly in U-Boot + - Enables NVMe PCI support & booting from it + - Enables framebuffer driver, passes it as EFI FB + - Enables Realtek RTL8169 driver + - Get rid of DHCP boot, it is confusing and not helpful + +Applies cleanly over U-Boot 2023.4 +Reuses QEMU virt board config, build like this: + make qemu-riscv64_smode_defconfig + CROSS_COMPILE=riscv64-linux-gnu- make + +Resulting firmware works fine on both RVVM and QEMU + +diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig +index 48ca4ff4..faa17f33 100644 +--- a/arch/riscv/Kconfig ++++ b/arch/riscv/Kconfig +@@ -15,7 +15,7 @@ config TARGET_MICROCHIP_ICICLE + bool "Support Microchip PolarFire-SoC Icicle Board" + + config TARGET_QEMU_VIRT +- bool "Support QEMU Virt Board" ++ bool "Support QEMU/RVVM Virt Boards" + + config TARGET_SIFIVE_UNLEASHED + bool "Support SiFive Unleashed Board" +diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig +index 6114e1b8..7c25825a 100644 +--- a/board/emulation/qemu-riscv/Kconfig ++++ b/board/emulation/qemu-riscv/Kconfig +@@ -29,6 +29,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select GENERIC_RISCV + select SUPPORT_SPL ++ imply OPTIMIZE_INLINING + imply AHCI + imply SMP + imply BOARD_LATE_INIT +@@ -50,7 +51,12 @@ config BOARD_SPECIFIC_OPTIONS # dummy + imply SCSI_AHCI + imply AHCI_PCI + imply E1000 ++ imply RTL8169 + imply NVME ++ imply NVME_PCI ++ imply VIDEO ++ imply VIDEO_SIMPLE ++ imply NO_FB_CLEAR + imply PCI + imply PCIE_ECAM_GENERIC + imply SCSI +diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h +index 20135f56..821251a3 100644 +--- a/include/configs/qemu-riscv.h ++++ b/include/configs/qemu-riscv.h +@@ -19,9 +19,9 @@ + + #define BOOT_TARGET_DEVICES(func) \ + func(QEMU, qemu, na) \ ++ func(NVME, nvme, 0) \ + func(VIRTIO, virtio, 0) \ +- func(SCSI, scsi, 0) \ +- func(DHCP, dhcp, na) ++ func(SCSI, scsi, 0) + + #include + -- 2.41.0 From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 2/2] gnu: Add opensbi-rvvm. Resent-From: Juliana Sims Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, ludo@gnu.org, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Thu, 27 Jul 2023 21:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64907@debbugs.gnu.org Cc: Juliana Sims , Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.16904927751754 (code B ref 64907); Thu, 27 Jul 2023 21:20:02 +0000 Received: (at 64907) by debbugs.gnu.org; 27 Jul 2023 21:19:35 +0000 Received: from localhost ([127.0.0.1]:43245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8OU-0000SE-Rm for submit@debbugs.gnu.org; Thu, 27 Jul 2023 17:19:35 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:36279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP8OQ-0000Rl-SF for 64907@debbugs.gnu.org; Thu, 27 Jul 2023 17:19:32 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id BCE721C0008; Thu, 27 Jul 2023 21:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=incana.org; s=gm1; t=1690492763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=60Gv3XcKswr6RuMQA1dQSP6cAcRlw4n5lVEqnWNONHg=; b=DYzeE/dEFi0oj4y1DM5sYVnmTTacexRQAYL58D4FgNA5lZ5sTdGLrD8/jf2fywH0PU2JiF wr3kVfWL4RSV/IlkOfVVxT/5zuoGIAXNHA4Gp7yH9D1Knozp6JfT1spkBCHM6g9LR+0+Sf U5fULlMohWq4+2p9Ljn8QVmgMglXp47W9CuUfn7GmhB8O8fp+3AsFLWFrlC3og9ZlEjijv 4nqTtBZFHXGa77lxESSJnh4G//U5EFV+k4QrNf0GWazfjEK63YzTmdRvQoc6psHUb/OCCY skURcQmqI2JuFwE9pZnVv6yNmmba1MTbYI1t1SqoBlyGnPhHcK+5xVkqtT+Zzg== From: Juliana Sims Date: Thu, 27 Jul 2023 17:18:58 -0400 Message-ID: <2502f76902b6983a62cb81e36959982ae7cdfe47.1690488628.git.juli@incana.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juli@incana.org X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/firmware.scm (opensbi-rvvm): New symbol. * gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch: New patch. --- gnu/packages/firmware.scm | 32 +++++++++++++++++++ .../patches/opensbi-rvvm-lowram-fdt.patch | 21 ++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ff5afbcbe1..728050b43a 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020, 2021, 2022 Marius Bakke ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2022, 2023 Maxim Cournoyer +;;; Copyright © 2023 Juliana Sims ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +44,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -567,6 +569,36 @@ (define-public opensbi-qemu (description "This package contains OpenSBI firmware files for use with QEMU."))) +(define-public opensbi-rvvm + (let ((base opensbi-generic)) + (package + (inherit base) + (name "opensbi-rvvm") + (source (origin + (inherit (package-source base)) + (patches (cons + ;; Allows opensbi to work on systems with <32M of RAM + ;; https://github.com/LekKit/patches-misc/blob/cc40906fbf1de9ae466304157f2bf7b8cc909cbe/opensbi/opensbi_lowram_fdt.patch + (search-patch "opensbi-rvvm-lowram-fdt.patch") + (origin-patches (package-source base)))))) + + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:make-flags flags) + #~(cons (string-append "FW_PAYLOAD_PATH=" + #$(file-append u-boot-rvvm + "/libexec/u-boot.bin")) + (delete "FW_PAYLOAD=n" + #$flags))))) + (inputs (cons u-boot-rvvm + (package-inputs base))) + (description (string-append (package-description base) + " + +This package contains OpenSBI firmware files for use with +@code{rvvm}. In particular, it adds support for low-RAM systems and builds a +@code{fw_payload.bin} file using @code{u-boot-rvvm-riscv64}."))))) + (define-public seabios (package (name "seabios") diff --git a/gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch b/gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch new file mode 100644 index 0000000000..c9e27020f0 --- /dev/null +++ b/gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch @@ -0,0 +1,21 @@ +Authored-by: LekKit + +Allows OpenSBI to work on devices with <32M of RAM, +by moving FDT into page alignment zone before the kernel. +This also allows running kernels that are >32M in size. + +Applies cleanly onto OpenSBI 1.2 + +diff --git a/platform/generic/objects.mk b/platform/generic/objects.mk +index 136853e..104a063 100644 +--- a/platform/generic/objects.mk ++++ b/platform/generic/objects.mk +@@ -32,7 +32,7 @@ else + # This needs to be 2MB aligned for 64-bit system + FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x200000))) + endif +-FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x2200000))) ++FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x100000))) + FW_PAYLOAD=y + ifeq ($(PLATFORM_RISCV_XLEN), 32) + # This needs to be 4MB aligned for 32-bit system -- 2.41.0 From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Aug 2023 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Juliana Sims Cc: Vagrant Cascadian , 64907@debbugs.gnu.org, Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.169187370811776 (code B ref 64907); Sat, 12 Aug 2023 20:56:01 +0000 Received: (at 64907) by debbugs.gnu.org; 12 Aug 2023 20:55:08 +0000 Received: from localhost ([127.0.0.1]:57569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUvdb-00033r-KN for submit@debbugs.gnu.org; Sat, 12 Aug 2023 16:55:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUvdZ-00033F-TJ for 64907@debbugs.gnu.org; Sat, 12 Aug 2023 16:55:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUvdS-0003ZK-RA; Sat, 12 Aug 2023 16:54:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=24kL5skyLBnHs70fInJ68lRHptaP7CcS9EsVg95iF4w=; b=TnNJHjVl+SdmR7p4Vwn4 sjQuNjqKvhiZQAHIMV1IP9oX1D38jJTdIYrrvEAfNgeuHsyJfOPgps4Fp/vNHfyQQPCZ+1kpuyhLN co4kNnzHPgehno9LKgN+CtpoA6iVxSd+FC7QS2yqbsd+LFSQugn+BK3Jz3ZiKXUzb4CcwTXKfj2Kt b0zpbynThCM0DWbMa7smjAsTqk/reoPQk2O2MNZM3xAY85YlVPeUdrB3RXTMcWSFADY3GvAdOxFut Qa2uGTuQggwsYEUrBCDEvZjDvuEMOpsnlix1dmlGMBf6YmoxPmaZU/ClpL1AzEhZc3SRykVp5pbIX gSQau6GgkuWNjw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Thermidor an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Loutre X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 12 Aug 2023 22:54:56 +0200 In-Reply-To: (Juliana Sims's message of "Thu, 27 Jul 2023 16:13:57 -0400") Message-ID: <877cq0dlr3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Juliana Sims skribis: > These patches create specialized U-Boot and OpenSBI packages to use with = RVVM by > applying RVVM's author's patches to those projects. Additionally, they bu= ild > this patched version of U-Boot into OpenSBI's `fw_payload.bin`, mimicking= the > binary release from RVVM. Vagrant, Efraim: could you take a look? https://issues.guix.gnu.org/64907 I=E2=80=99ll take this as an opportunity to remove myself from the =E2=80= =98embedded=E2=80=99 team, where I ended up unwillingly in 7cf606a5a0515b9a124fb58a06e3daa24a4a4e69. :-) Ludo=E2=80=99. From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Aug 2023 23:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Juliana Sims , 64907@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.169335047011273 (code B ref 64907); Tue, 29 Aug 2023 23:08:02 +0000 Received: (at 64907) by debbugs.gnu.org; 29 Aug 2023 23:07:50 +0000 Received: from localhost ([127.0.0.1]:51794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb7oL-0002vl-Gv for submit@debbugs.gnu.org; Tue, 29 Aug 2023 19:07:49 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:44004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb7oI-0002vV-RH for 64907@debbugs.gnu.org; Tue, 29 Aug 2023 19:07:47 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:50]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id A55CE1ADEE; Tue, 29 Aug 2023 16:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1693350450; bh=CwgeXU43qeZs8vbCYx7wAFFBxbgVPpB5Jz4CyK/Idgg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Tq+YUSkbniH0dAHizHDXhlLH6HCmnwXuMPlA+u4m6EaSmg10sLnzLfkTg3n0fa6a0 e+hiP9SBa62wGHmVqDBJZBNA83SwQpkv31VcDks6opoDCzh1q6AyH9DNde+4lSjJqX B453WcSgfpKsrzj2k1dDKQ1MlMuC9suzD6sEd25BKx6Q8vUIlN93hIe1+lzGvEbn31 KdEfuGp2Sgh5kjs8y+m16jGt0vqsOXKP8EiMhcfJnu+iIQIbZItYaotKhkZs7PSSZZ NETTeWINVFc3Vd8xZsFpxk4KVuoEVfT/5x6qHeG3JJbDs6555d+gfclEmfot9FKRZb m5/BcmeJYtclg== From: Vagrant Cascadian In-Reply-To: References: Date: Tue, 29 Aug 2023 16:07:27 -0700 Message-ID: <87fs41v45s.fsf@wireframe> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On 2023-07-27, Juliana Sims wrote: > These patches create specialized U-Boot and OpenSBI packages to use with RVVM by > applying RVVM's author's patches to those projects. Additionally, they build > this patched version of U-Boot into OpenSBI's `fw_payload.bin`, mimicking the > binary release from RVVM. It could be a lot of work over time to maintain a patched version of u-boot and/or opensbi, especially if those patches are not going to be merged upstream at some point... > The RVVM author claims faster execution than QEMU. How much faster? Knowing nothing about RVVM, When I asked on irc.libera.chat #riscv that was basically the question I got... So if going that route, would want to make sure the performance difference is significant. > As such, the ultimate goal of > these packages is to create a system service which will allow developers to > easily run Guix under RVVM for the purpose of development, much like > hurd-vm-service-type provides a way to run Hurd under Guix. However, that's a > larger project, and getting these packaged as they are will already prove > useful. Anyone wishing to use them can simply run: > > ``` > guix shell --pure rvvm opensbi-rvvm > rvvm /gnu/store/-opensbi-rvvm-/fw_payload.bin -i .img [...] > ``` > > I have tested these packages with the FreeBSD-13.2 RV64 raw disk image, so I > know they run successfully. > > It's worth noting that opensbi-generic works fine with RVVM. However, it does > not provide `fw_payload.bin` - only `fw_jump.bin` - so this version provides > more flexibility. That said, opensbi-rvvm is 5.3 MB compared to > opensbi-generic's 1.3 MB. Because of that, I'm ambivalent about adding it. I > leave the decision on whether or not to include it entirely up to others; > there's no sense in throwing away work I already did if it may be useful. If it requires patches, I am a bit concerned about long-term maintenence... If it does not require patches, that does not seem like a huge increase, or an alternate build that also ships the fw_payload.bin file. > It may be worth noting that RVVM also has patches for the Linux kernel. However, > upon inspection they seem to primarily be concerned with decreasing binary size, > which can be worked around if needed. The linux-libre-riscv64-generic package > should work just fine, but this has not been tested. Worked around how? live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZO56LwAKCRDcUY/If5cW qvzpAQDRSn/Lk1aMBHN5yLY5dLVnRrZoRX85mBipWN13vyYjfwD/aSgtTaXairWU sljd9eysIQpTfXm5qptAtLvHIr4x2w4= =YktN -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Aug 2023 23:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Juliana Sims , 64907@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.169335147212765 (code B ref 64907); Tue, 29 Aug 2023 23:25:01 +0000 Received: (at 64907) by debbugs.gnu.org; 29 Aug 2023 23:24:32 +0000 Received: from localhost ([127.0.0.1]:51806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb84W-0003Jp-7b for submit@debbugs.gnu.org; Tue, 29 Aug 2023 19:24:32 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:58606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb84S-0003Jb-4v for 64907@debbugs.gnu.org; Tue, 29 Aug 2023 19:24:30 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:50]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 2D4311ADEE; Tue, 29 Aug 2023 16:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1693351452; bh=eXFuIEdh9nsaMX0EQ6MwB8MxKD/8Nb2usWqB9+jN9dQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DSYe8zXfy6N/Y4c/tZJls3bvPSymKgdvYjB9TOt0XS9znk+I0CL5ROLtDcKwHDphJ pk3aAQmdJ1ZTj+W616VLYvwEOLSVFy1xPMO7O2Mo3AvrIANMTi0cNJWBzfcDjctlPd kLTcVxfRh5PXEK/eftZtZymzw+0M/GkNc7FIBPbRmXGvh4swK0dKLFfMFRWMLnWCsg GjGffWnvZZ3Soq0WiEdkI93zTMtRG+TgYZW/EVmqGu3+gIh1lIuNRoq44Dm2xJStw1 gWDHmR3PLQaugCQ3+3zcgQBCzcDvjLqoaoQy0L5v//sxaaZemHoUJVdyIhQGcecBk/ fbG3xBGiKaKlw== From: Vagrant Cascadian In-Reply-To: <87fs41v45s.fsf@wireframe> References: <87fs41v45s.fsf@wireframe> Date: Tue, 29 Aug 2023 16:24:05 -0700 Message-ID: <87bkepv3e2.fsf@wireframe> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On 2023-08-29, Vagrant Cascadian wrote: > On 2023-07-27, Juliana Sims wrote: >> These patches create specialized U-Boot and OpenSBI packages to use with RVVM by >> applying RVVM's author's patches to those projects. Additionally, they build >> this patched version of U-Boot into OpenSBI's `fw_payload.bin`, mimicking the >> binary release from RVVM. ... >> It's worth noting that opensbi-generic works fine with RVVM. However, it does >> not provide `fw_payload.bin` - only `fw_jump.bin` - so this version provides >> more flexibility. That said, opensbi-rvvm is 5.3 MB compared to >> opensbi-generic's 1.3 MB. Because of that, I'm ambivalent about adding it. I >> leave the decision on whether or not to include it entirely up to others; >> there's no sense in throwing away work I already did if it may be useful. > > If it requires patches, I am a bit concerned about long-term > maintenence... If it does not require patches, that does not seem like a > huge increase, or an alternate build that also ships the fw_payload.bin > file. Thinking a little more, from what I recall, the whole point of fw_jump.bin is so that you can dynamically specify the payload at runtime ... why do we need a separate fw_payload.bin created at build-time, if you can just pass a (potentially custom) payload at runtime? It has been a while since I have used these components for virtual riscv systems, so my memory may be a little rusty or recent usage may have changed... :) live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZO5+FQAKCRDcUY/If5cW qkPJAQCBba5DHEXv/AZtAZ2PsLKE9M46C059tRn+u8aGoS0WDAD9FSYKjusBeXf2 SaM762oL9DWhHxeKa4dEhUL+DYSvEQ0= =ImNp -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 0/2] gnu: Add rvvm support packages. Resent-From: Juliana Sims Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Sep 2023 01:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Vagrant Cascadian Cc: 64907 <64907@debbugs.gnu.org>, Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.16937054011622 (code B ref 64907); Sun, 03 Sep 2023 01:44:02 +0000 Received: (at 64907) by debbugs.gnu.org; 3 Sep 2023 01:43:21 +0000 Received: from localhost ([127.0.0.1]:38954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcc92-0000Q6-Mf for submit@debbugs.gnu.org; Sat, 02 Sep 2023 21:43:21 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:44597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcc90-0000Ps-CM for 64907@debbugs.gnu.org; Sat, 02 Sep 2023 21:43:19 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1CFC2240003; Sun, 3 Sep 2023 01:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=incana.org; s=gm1; t=1693705381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dHacoNnEW48584BbnBmT+vTv0wgWLcVOInjlBCfAb+8=; b=OgN+J/5w7QUatoDwHXMlMSgledXYxFY036ajn8+jyX1pn4DAapXgSotPiQGp5jy4f8Lfw4 7LzCtNtPMkONWfutUczPPpBomk0WyPUv9AmTYa7cn5DdMsgS2M731WXDK11omaS/wkQ2Pd jkr1q/vpvthxSnWsgmR9sO7TnkympN9m6OLpa7f5+axRkCKDEqVlgxoAUpEZjT1medg3gX SdEkZlYPERfP8rmpobNOVWt82Ez8cnL3MlyQMCE9k3HTkhOhmo6278psyAaRhxdtYes27Z aSa6U/EqT0o0ZL1QDlttPTUxduZKzAXCYdsuJFnlKw9hGEMDdd7krUL0lDYK6A== Date: Sat, 02 Sep 2023 21:42:48 -0400 From: Juliana Sims Message-Id: In-Reply-To: <87bkepv3e2.fsf@wireframe> References: <87fs41v45s.fsf@wireframe> <87bkepv3e2.fsf@wireframe> X-Mailer: geary/43.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-GND-Sasl: juli@incana.org X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Vagrant, > It could be a lot of work over time to maintain a patched version of > u-boot and/or opensbi, especially if those patches are not going to be > merged upstream at some point... I make a point of periodically updating and checking for the continued functionality of all new packages I submit to Guix. There is a fair bit of RISC-V work I would like to do over the next years so I would have no problem extending this personal policy to these packages as well. > How much faster? Knowing nothing about RVVM, When I asked on > irc.libera.chat #riscv that was basically the question I got... No idea, but having done a fair bit of RISC-V development on emulators, I'm willing to take anything I can get XD > Worked around how? So, that turn of phrase was pretty arbitrary, but the sentiment I wished to communicate is that I doubt most developers need Linux to be tiny. I don't even understand *why* Linux needs to be shrunk for rvvm; perhaps to minimize the disk space or memory given to it? If that's the case, then the work-around would be to give it more disk and memory from the host. > Thinking a little more, from what I recall, the whole point of > fw_jump.bin is so that you can dynamically specify the payload at > runtime ... why do we need a separate fw_payload.bin created at > build-time, if you can just pass a (potentially custom) payload at > runtime? As mentioned in the cover letter, you can drop the opensbi patch if you like. I didn't think to test opensbi-generic before packaging this patched version, and figured "waste not; want not." However, rvvm does not work with any version of u-boot currently in Guix. Hope this helps with any concerns. Let me know if I need to make any changes to the patch(es). Thanks, Juli From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 1/2] gnu: Add u-boot-rvvm. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Sep 2023 02:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Juliana Sims , 64907@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.16937074955105 (code B ref 64907); Sun, 03 Sep 2023 02:19:02 +0000 Received: (at 64907) by debbugs.gnu.org; 3 Sep 2023 02:18:15 +0000 Received: from localhost ([127.0.0.1]:38973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qccgo-0001KG-Ql for submit@debbugs.gnu.org; Sat, 02 Sep 2023 22:18:15 -0400 Received: from cascadia.aikidev.net ([2600:3c01:e000:267:0:a171:de7:c]:56336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qccgk-0001K1-QK for 64907@debbugs.gnu.org; Sat, 02 Sep 2023 22:18:13 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:50]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id C17581AAD1; Sat, 2 Sep 2023 19:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1693707471; bh=StcSp5X6ujs0OVcJqpGbvp+8pH1ISc72C8zFRZUF+2M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SPaPHjqBVy4nPoM8dGGHjy34c58aKgB+zMYcLoDgWEu2jsqzXAtQArZ7VxXwCyuV3 zk7ZixJoexI6Bs6Zj+yrCqG5fnXMTZd5tXt8WzraqmF2DyfzcsDO4gaLRlzZk8pZM3 6Lj/QWWuwl83zge2sWltmvCMfXvWkzxshYFUcfyx9UZe7YQ1U50U543KpneciuQ0Ek yWY9zD0L0zrHmGAe8xGxaoYIK0buxIFNFAvj15lub3ncs8j9sWGkNXf3y/OarW+lAc qCv/WFyRZb4wLR5/fI2u+MRcyyC5kZUHeEExDsPMa5KPBzKa7OPIm4fnWKtppCz+Z5 32fBeZ9NIainQ== From: Vagrant Cascadian In-Reply-To: <62cefdc5d6a4b0e3d6e611a6b6541f00acc19d9f.1690488628.git.juli@incana.org> References: <62cefdc5d6a4b0e3d6e611a6b6541f00acc19d9f.1690488628.git.juli@incana.org> Date: Sat, 02 Sep 2023 19:17:47 -0700 Message-ID: <87r0ngm244.fsf@wireframe> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-07-27, Juliana Sims wrote: > * gnu/packages/bootloaders.scm (%u-boot-rvvm-support-patch, u-boot-rvvm):= New > symbol. > * gnu/packages/patches/u-boot-rvvm-support.patch: New patch. ... > diff --git a/gnu/packages/patches/u-boot-rvvm-support.patch b/gnu/package= s/patches/u-boot-rvvm-support.patch > new file mode 100644 > index 0000000000..1e62a2d61d > --- /dev/null > +++ b/gnu/packages/patches/u-boot-rvvm-support.patch > @@ -0,0 +1,67 @@ > +Patch to support NVMe and RVVM board properly in U-Boot > + - Enables NVMe PCI support & booting from it > + - Enables framebuffer driver, passes it as EFI FB > + - Enables Realtek RTL8169 driver > + - Get rid of DHCP boot, it is confusing and not helpful > + > +Applies cleanly over U-Boot 2023.4 > +Reuses QEMU virt board config, build like this: > + make qemu-riscv64_smode_defconfig > + CROSS_COMPILE=3Driscv64-linux-gnu- make > + > +Resulting firmware works fine on both RVVM and QEMU > + > +diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > +index 48ca4ff4..faa17f33 100644 > +--- a/arch/riscv/Kconfig > ++++ b/arch/riscv/Kconfig > +@@ -15,7 +15,7 @@ config TARGET_MICROCHIP_ICICLE > + bool "Support Microchip PolarFire-SoC Icicle Board" > +=20 > + config TARGET_QEMU_VIRT > +- bool "Support QEMU Virt Board" > ++ bool "Support QEMU/RVVM Virt Boards" > +=20 > + config TARGET_SIFIVE_UNLEASHED > + bool "Support SiFive Unleashed Board" This seems unecessary, unless this is pulling from a patch submitted to upstream u-boot that is likely to be merged. > +diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-r= iscv/Kconfig > +index 6114e1b8..7c25825a 100644 > +--- a/board/emulation/qemu-riscv/Kconfig > ++++ b/board/emulation/qemu-riscv/Kconfig > +@@ -29,6 +29,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy > + def_bool y > + select GENERIC_RISCV > + select SUPPORT_SPL > ++ imply OPTIMIZE_INLINING > + imply AHCI > + imply SMP > + imply BOARD_LATE_INIT > +@@ -50,7 +51,12 @@ config BOARD_SPECIFIC_OPTIONS # dummy > + imply SCSI_AHCI > + imply AHCI_PCI > + imply E1000 > ++ imply RTL8169 > + imply NVME > ++ imply NVME_PCI > ++ imply VIDEO > ++ imply VIDEO_SIMPLE > ++ imply NO_FB_CLEAR > + imply PCI > + imply PCIE_ECAM_GENERIC > + imply SCSI I *think* all of these options could be done by passing #:configs ... For example, how the u-boot-qemu-arm changes an option: (define-public u-boot-qemu-arm (make-u-boot-package "qemu_arm" "arm-linux-gnueabihf" #:configs '("# CONFIG_FIT_SIGNATURE is not set"))) > +diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h > +index 20135f56..821251a3 100644 > +--- a/include/configs/qemu-riscv.h > ++++ b/include/configs/qemu-riscv.h > +@@ -19,9 +19,9 @@ > +=20 > + #define BOOT_TARGET_DEVICES(func) \ > + func(QEMU, qemu, na) \ > ++ func(NVME, nvme, 0) \ > + func(VIRTIO, virtio, 0) \ > +- func(SCSI, scsi, 0) \ > +- func(DHCP, dhcp, na) > ++ func(SCSI, scsi, 0) > +=20 > + #include > +=20 > --=20 > 2.41.0 I would just leave the DHCP in; it surely cannot hurt *that* much... or? ... at which point, if all my other suggestions are accepted, the NVME part might be the only patch to upstream sources, and you could fix it with a snippet or phase or a one-line patch. :) live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZPPsywAKCRDcUY/If5cW qm+5AQD8XdH/XvDvjQ8t1ydsMADxOVMQHXrr+F8oEDQ5FRnZhwEA8+I4F/8zFqbC BmN0KQ74hs7djE370ZJGITgWtaZWpwY= =m0YE -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 2/2] gnu: Add opensbi-rvvm. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Sep 2023 02:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Juliana Sims , 64907@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Efraim Flashner Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.16937079135734 (code B ref 64907); Sun, 03 Sep 2023 02:26:02 +0000 Received: (at 64907) by debbugs.gnu.org; 3 Sep 2023 02:25:13 +0000 Received: from localhost ([127.0.0.1]:38977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qccnY-0001UN-Ph for submit@debbugs.gnu.org; Sat, 02 Sep 2023 22:25:13 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:46366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qccnU-0001U6-Qb for 64907@debbugs.gnu.org; Sat, 02 Sep 2023 22:25:10 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:50]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id C2AA71AAD1; Sat, 2 Sep 2023 19:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1693707889; bh=I2X6/CCK1D6k7ejM4ytEbhvRc0k+TjJPjjqnR03Hjw0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BdaIptThtYRMgp3/j6xQA1t6sCZOPFH+thKHJzvb+xE4tWYdlAgM6/YJbggZrH155 E9YcIoP7PQWxUmrsWxrfCusWXrjtYfV3n6A54/xQYceOFKVttuDn3gyigwevqcpGLN SP5JuzBnkMXhhyZZT/PfVBy7pvAqLYTC5zHFIEPc5uWynLzvIlIXbF3dsqZVKqt9yx +D91hlAa2NQxJAVQmwaO//B7FIVlvVnyfn4NZA72U/D7Ewn4jSL1tSHfMyiNGY6HTc ROxVKKEjf3+XCB+TsRrowOsojN5KKHcSx9FzO6nnhqjzMlvWFV0MKUATvt0mi5iZiT ppuUp6rXhwiWQ== From: Vagrant Cascadian In-Reply-To: <2502f76902b6983a62cb81e36959982ae7cdfe47.1690488628.git.juli@incana.org> References: <2502f76902b6983a62cb81e36959982ae7cdfe47.1690488628.git.juli@incana.org> Date: Sat, 02 Sep 2023 19:24:45 -0700 Message-ID: <87o7ikm1si.fsf@wireframe> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-07-27, Juliana Sims wrote: > * gnu/packages/firmware.scm (opensbi-rvvm): New symbol. > * gnu/packages/patches/opensbi-rvvm-lowram-fdt.patch: New patch. ... > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > index ff5afbcbe1..728050b43a 100644 > --- a/gnu/packages/firmware.scm > +++ b/gnu/packages/firmware.scm ... > @@ -567,6 +569,36 @@ (define-public opensbi-qemu > (description > "This package contains OpenSBI firmware files for use with QEMU."))) >=20=20 > +(define-public opensbi-rvvm > + (let ((base opensbi-generic)) > + (package > + (inherit base) > + (name "opensbi-rvvm") > + (source (origin > + (inherit (package-source base)) > + (patches (cons > + ;; Allows opensbi to work on systems with <32M= of RAM > + ;; https://github.com/LekKit/patches-misc/blob= /cc40906fbf1de9ae466304157f2bf7b8cc909cbe/opensbi/opensbi_lowram_fdt.patch > + (search-patch "opensbi-rvvm-lowram-fdt.patch") > + (origin-patches (package-source base)))))) As discussed elsewhere, maybe try the unpatched opensbi-generic. > + > + (arguments > + (substitute-keyword-arguments (package-arguments base) > + ((#:make-flags flags) > + #~(cons (string-append "FW_PAYLOAD_PATH=3D" > + #$(file-append u-boot-rvvm > + "/libexec/u-boot.bin")) > + (delete "FW_PAYLOAD=3Dn" > + #$flags))))) > + (inputs (cons u-boot-rvvm > + (package-inputs base))) > + (description (string-append (package-description base) So my main question is if you can use rvvm with an unmodified opensbi-generic, passing opensbi-generic and the u-boot-rvvm as commandline arguments? I know this can be done with qemu... If it really isn't possible, then just drop the low-ram patch if that still works. Thanks! live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZPPubQAKCRDcUY/If5cW qiMtAQDIasnZtkE07kLZxnoqd/bMSOgOmiT2rF5XIIvniXKm0AD/UxGqUjdXcopE cmY/17TulrBhYofkEP4CCog0I1g3IQA= =eitP -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 07:25:44 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64907] [PATCH 2/2] gnu: Add opensbi-rvvm. References: In-Reply-To: Resent-From: Eva Kurchatova Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 04:06:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64907 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64907@debbugs.gnu.org Received: via spool by 64907-submit@debbugs.gnu.org id=B64907.171082111526235 (code B ref 64907); Tue, 19 Mar 2024 04:06:05 +0000 Received: (at 64907) by debbugs.gnu.org; 19 Mar 2024 04:05:15 +0000 Received: from localhost ([127.0.0.1]:36012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmQiv-0006ou-Ox for submit@debbugs.gnu.org; Tue, 19 Mar 2024 00:05:14 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:46187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmIVv-00037e-6S for 64907@debbugs.gnu.org; Mon, 18 Mar 2024 15:19:15 -0400 Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-568a9c331a3so4519736a12.0 for <64907@debbugs.gnu.org>; Mon, 18 Mar 2024 12:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710789451; x=1711394251; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=EG3R0gEsF90IkgiB25CRjwZr9XwlqMI11RTmQ/NcNpQ=; b=YCgwKx9neZRYbrDBhP7waKQoVc0HDjY9QU2bkXsR6mYM7XiDj/N7drxzK3fmLNbsEm 6tgndToMrv289Obg3O3rVwJOWb2SHsxEI9qlGaq2Y7250FxMrKSzsIXTX8rZ6tztCRnA lt4ohRzBcrqo/sbQNyg/VmBusW0XFWLr8iWYcUyfFSEGwlBAbKkDormggTMinIlT/OOZ qSP+bA9nbnjKVaKjdvipGN1+rYN8asDrYV10wXCi1bVBIakWzo9PfhjMDP3BqGmeR+R2 0L83PwE+lZSPZgAUoga+4W5qddxD0sx4T/7acacEsETpuecpbSOwzfCrL5+zg60zAxeG cSnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710789451; x=1711394251; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EG3R0gEsF90IkgiB25CRjwZr9XwlqMI11RTmQ/NcNpQ=; b=qzxEZlBGnqYRz1hPNZogbjjA1kH5O/ZALN2gZ7JQBpRx3siKmslRmwVAdmIeXGDErD 1OvAYOgle63wuJcgbDPH/2XwIzts8y/rwjMKYd7ufoscy1k7c0zJG9gvPvhQiRWEw2c5 YU3v4G4dnQXPlavvmcoTcLB1uLJjiU9CEjX70xES0BRowHxcugLdmysmBqtD6WKpY1wP V783LK4b6L0oFg37A6HyC/lcPoADEGMt2K0r9hZtGs07HGSG3yOV3HfTEo5Pu5htpg7n 12+/efcKvOUSWkDHp88z8SQV7tVDH5LCJS2iQpFsTVDsVlv8M2YbaLHcmJU7fnCh3Bon edcg== X-Gm-Message-State: AOJu0YyeZEyVGwMg7owvb/InBVKqwTgntXUlgzExZZ7/UTOC/q5Ry2Dp U4fr5sGcubePbNZzkniyskj6QzQoTEyGv0EZhenrgjPeN5ooTsOPFGI4DUekwc9ebijc3lIqs07 P2N+xsz1htM4JDjdNjPfS8OROf8vW1oCD3N8= X-Google-Smtp-Source: AGHT+IHAQnqJtRhwzQmnj5BwfCr7h+qKjhfiVUn8FPlG2NjwbpFUsL/QvMAMfrG9pCidMGTprzO5AOeIlFCXSPKoOlk= X-Received: by 2002:ac2:4d99:0:b0:513:d381:65d6 with SMTP id g25-20020ac24d99000000b00513d38165d6mr8289086lfe.17.1710786205712; Mon, 18 Mar 2024 11:23:25 -0700 (PDT) MIME-Version: 1.0 From: Eva Kurchatova Date: Mon, 18 Mar 2024 20:23:14 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Tue, 19 Mar 2024 00:05:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) RVVM developer here. First of all, thanks for package support. There is v0.6 released which has stable networking and a lot of small features/fixes. The opensbi patch is not necessary at all. It is kinda an internal optimization patch I use because I like to optimize stuff, and when patches aren't getting accepted I put them in my repo. Generic OpenSBI works without a problem there. RVVM generally tries to be very compatible with QEMU, but some devices are different - for example instead of Virtio-blk, NVMe drives are emulated. This configuration is also possible on QEMU, so it's not like it's entirely incompatible - more like a minimal subset of it. The U-Boot patch is needed because, for some reason QEMU U-Boot config doesn't enable NVMe boot (however you can choose NVMe drives with QEMU, and they too won't work there). I believe this is an oversight on U-Boot side. I also enabled EFI framebuffer which is needed by Haiku OS guests. QEMU doesn't have an EFI framebuffer, but adding another feature into U-Boot doesn't hurt. It still works on QEMU afterwards. I also see mentions that I am purposely making RVVM incompatible with QEMU, and I want to remind you that this is not the case at all. The U-Boot issue is simply a lacking build option on their side, which affects some QEMU usecases too. It's more like QEMU U-Boot is incompatible with anything other than the default unconfigured QEMU Virt board. The real solution would be to reach upstream U-Boot and ask to enable NVMe boot hook, and options `VIDEO` `VIDEO_SIMPLE`. Example (notice it has other stuff enabled, not intended for upstream): https://github.com/LekKit/patches-misc/blob/master/uboot/uboot2024_rvvm_support.patch