From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D213AD80591 for ; Mon, 11 Sep 2023 07:08:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=d+upJ5ew1iccUmk+jKeRfmtzLv79623DO6PlLOwQSeI=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1694416081; v=1; b=BK9NaZjYe8P0+B3DbXsenDJjxjdLYNDpCJ+ZJ7mOqiXTkmArAlS8OlT2CbZabSN6KDFWPxcb xfzS+Wo2Jmo8xMJBy2m7Viswh8m0Ab8Wxk+CT4/KDizWXoeRse7or0EwyJ2MLPH99nOKkWfgt/b 0FBGyHKvA9a8w+vywVDobvTQ= X-Received: by 127.0.0.2 with SMTP id EhKqYY7687511xoivzTPx5wQ; Mon, 11 Sep 2023 00:08:01 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.53151.1694416075540317080 for ; Mon, 11 Sep 2023 00:07:55 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-124-GT_oX9jHPie7ksu8eZ7n6w-1; Mon, 11 Sep 2023 03:07:49 -0400 X-MC-Unique: GT_oX9jHPie7ksu8eZ7n6w-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15FE4181A6E0; Mon, 11 Sep 2023 07:07:49 +0000 (UTC) X-Received: from [10.39.192.92] (unknown [10.39.192.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B75ED2027046; Mon, 11 Sep 2023 07:07:47 +0000 (UTC) Message-ID: <32d053f7-5740-6bdb-f34b-ea9a0262783c@redhat.com> Date: Mon, 11 Sep 2023 09:07:46 +0200 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI To: Sunil V L Cc: edk2-devel-groups-io , Andrei Warkentin , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Jordan Justen References: <20230907145825.87830-1-lersek@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Qjd20hSARJwq3y1KGL4KaazPx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BK9NaZjY; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) On 9/11/23 08:22, Sunil V L wrote: > On Mon, Sep 11, 2023 at 08:15:26AM +0200, Laszlo Ersek wrote: >> On 9/11/23 07:32, Laszlo Ersek wrote: >>> On 9/8/23 08:13, Sunil V L wrote: >>>> Hi Laszlo, >>>> >>>> On Thu, Sep 07, 2023 at 04:58:25PM +0200, Laszlo Ersek wrote: >>>>> Explain how users can compose their pre-OS environment purely from >>>>> binaries they've built themselves. >>>>> >>>>> Cc: Andrei Warkentin >>>>> Cc: Ard Biesheuvel >>>>> Cc: Gerd Hoffmann >>>>> Cc: Jiewen Yao >>>>> Cc: Jordan Justen >>>>> Cc: Sunil V L >>>>> Signed-off-by: Laszlo Ersek >>>>> --- >>>>> >>>>> Notes: >>>>> rendered version: >>>>> =20 >>>>> https://github.com/lersek/edk2/tree/bring-your-own-opensbi/OvmfPk= g/RiscVVirt#test-with-your-own-opensbi-binary >>>>> >>>>> OvmfPkg/RiscVVirt/README.md | 17 +++++++++++++++++ >>>>> 1 file changed, 17 insertions(+) >>>>> >>>>> diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.m= d >>>>> index 8c3ac37b802a..dbb40bbe89b0 100644 >>>>> --- a/OvmfPkg/RiscVVirt/README.md >>>>> +++ b/OvmfPkg/RiscVVirt/README.md >>>>> @@ -69,3 +69,20 @@ Below example shows how to boot openSUSE Tumblewee= d E20. >>>>> -device virtio-net-pci,netdev=3Dnet0 \ >>>>> -device virtio-blk-device,drive=3Dhd0 \ >>>>> -drive file=3DopenSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw= ,format=3Draw,id=3Dhd0 >>>>> + >>>>> +## Test with your own OpenSBI binary >>>>> +Using the above QEMU command line, **RISCV_VIRT_CODE.fd** is launche= d by the >>>>> +OpenSBI binary that is bundled with QEMU. You can build your own Ope= nSBI binary >>>>> +as well: >>>>> + >>>>> + OPENSBI_DIR=3D... >>>>> + git clone https://github.com/riscv/opensbi.git $OPENSBI_DIR >>>>> + make -C $OPENSBI_DIR \ >>>>> + -j $(getconf _NPROCESSORS_ONLN) \ >>>>> + CROSS_COMPILE=3Driscv64-linux-gnu- \ >>>>> + PLATFORM=3Dgeneric >>>>> + >>>> Do we need to duplicate these OpenSBI build instructions in EDK2? IMO, >>>> we should just document how to use -bios to use custom OpenSBI image. >>>> The build instructions for other software repos can change at any >>>> time. >>> >>> Can we include the opensbi project URL at least? >> >> BTW, I disagree with your larger message (as I perceive it). >> >> While it's true that build instructions may change at any time, that's >> just a generic statement about any software and any documentation in >> existence. All documentation goes stale at some point. >> > Agreed. But my point is, this documentation which provides build > instructions of opensbi doesn't belong to edk2 but opensbi. If something > is missing in the opensbi build instructions like you mentioned, it > should be submitted as a patch to opensbi repo rather edk2, right? I don't know. If two projects are used in conjunction, which project's documentation should cover the combined use? Laszlo >=20 > -Sunil >=20 >> And in this particular case, I needed to fish out the build commands, >> and the resultant "fw_dynamic.bin" filename, from the QEMU tree, not the >> OpenSBI tree. I'm not aware of any documentation that makes a dedicated >> statement about building OpenSBI *for* running edk2. >> >> The OpenSBI root "README.md" @ b20bd479eff1 only says "For example, to >> compile the platform library and the firmware examples for the QEMU >> RISC-V *virt* machine, ** should be *generic*". It does >> not mention the build output pathname >> "build/platform/generic/firmware/fw_dynamic.bin". >> >> Laszlo >> >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108480): https://edk2.groups.io/g/devel/message/108480 Mute This Topic: https://groups.io/mt/101216052/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-