From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ENfyNNnkwmRk2wAASxT56A (envelope-from ) for ; Thu, 27 Jul 2023 23:42:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cEE4NNnkwmTQfwEAG6o9tA (envelope-from ) for ; Thu, 27 Jul 2023 23:42:49 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4D9744F9F5 for ; Thu, 27 Jul 2023 23:42:49 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=incana.org header.s=gm1 header.b="DYzeE/dE"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690494169; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=60Gv3XcKswr6RuMQA1dQSP6cAcRlw4n5lVEqnWNONHg=; b=fKbyUvbHvL4/RZnWp+d71sl8KTfu84w3RMmISAsLt1OrLbj878+6m564MV8nd+KGhdB3VZ FjThoVcg/hUu6h57NJtL0GUGpbFlRhQObZoIgMd4y1NfyVBtI/ZCZr4+0OKfhZqNyllc43 Kp1XTr/+DRIcwQyc21TXqqzBH2ViPwyejHsIJdNCvYxAg6j2zD0vJUmoa72teM2iAZfZle AZXvc/HsmDma+y5VDYFB94gYWxwr3h8MiVFVnqumo+wIfJkr4RJ0WvVwvo4sKlc84Q7ze/ uLexkhhzo3xjGuG5k9luOm8oQXVc0fnQ5tfBq+q5NIlmIEKp2nJEXKnshmBK+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=incana.org header.s=gm1 header.b="DYzeE/dE"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690494169; a=rsa-sha256; cv=none; b=TXWHfDjB4ZXuy906/ve8u+ge1Mr80FrZboeJu4yV/Ooa55kvZJ3+R7i1YRku+CkyAfg2P0 C8JIg57MLYSHbfr7dAQbGKOsmLdzmCUqELly985ny3A8sLgSSCLcVupnuP60kj0NNk85iT 75GbJB6z0d/W7naKE7J7kBxGAvhs2x6+Vx0lls36MYZAjqEKwOZ7Ift31tsQOXpkvZgb70 pKOS5GZE7wLS77PcgKlO+uWctm3dyq6AdAs50iss+fH6MVpleY0EZ9DpcEOxCpcFvWnm7e OOnrsSpwQUkJgLQDr/6oNkfLxKz1u9IyeTbdW8lrnwPaA4P4e1Uzx5M+4Ur5sw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qP8P1-00065p-1m; Thu, 27 Jul 2023 17:20:07 -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 1qP8Ow-00065J-Vu for guix-patches@gnu.org; Thu, 27 Jul 2023 17:20:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qP8Ow-00036Q-Km; Thu, 27 Jul 2023 17:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qP8Ow-0000T9-3U; Thu, 27 Jul 2023 17:20:02 -0400 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: 0.25 X-Migadu-Queue-Id: 4D9744F9F5 X-Migadu-Spam-Score: 0.25 X-Migadu-Scanner: mx0.migadu.com X-TUID: Pr/Uo1b2a1ml * 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