On 9/11/23 12:15, Sunil V L wrote:
> On Mon, Sep 11, 2023 at 09:07:46AM +0200, Laszlo Ersek wrote:
>> 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 <andrei.warken...@intel.com>
>>>>>>> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
>>>>>>> Cc: Gerd Hoffmann <kra...@redhat.com>
>>>>>>> Cc: Jiewen Yao <jiewen....@intel.com>
>>>>>>> Cc: Jordan Justen <jordan.l.jus...@intel.com>
>>>>>>> Cc: Sunil V L <suni...@ventanamicro.com>
>>>>>>> Signed-off-by: Laszlo Ersek <ler...@redhat.com>
>>>>>>> ---
>>>>>>>
>>>>>>> Notes:
>>>>>>>     rendered version:
>>>>>>>     
>>>>>>>     
>>>>>>> https://github.com/lersek/edk2/tree/bring-your-own-opensbi/OvmfPkg/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.md
>>>>>>> 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 Tumbleweed 
>>>>>>> E20.
>>>>>>>          -device virtio-net-pci,netdev=net0 \
>>>>>>>          -device virtio-blk-device,drive=hd0 \
>>>>>>>          -drive 
>>>>>>> file=openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw,format=raw,id=hd0
>>>>>>> +
>>>>>>> +## Test with your own OpenSBI binary
>>>>>>> +Using the above QEMU command line, **RISCV_VIRT_CODE.fd** is launched 
>>>>>>> by the
>>>>>>> +OpenSBI binary that is bundled with QEMU. You can build your own 
>>>>>>> OpenSBI binary
>>>>>>> +as well:
>>>>>>> +
>>>>>>> +    OPENSBI_DIR=...
>>>>>>> +    git clone https://github.com/riscv/opensbi.git $OPENSBI_DIR
>>>>>>> +    make -C $OPENSBI_DIR \
>>>>>>> +        -j $(getconf _NPROCESSORS_ONLN) \
>>>>>>> +        CROSS_COMPILE=riscv64-linux-gnu- \
>>>>>>> +        PLATFORM=generic
>>>>>>> +
>>>>>> 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?
>>
> Okay, fair enough. Let's add it. It appears to be very useful for any
> one new to RISC-V+edk2 and OpenSBI. Do you want to update the -kernel
> option also in v2 or will it be separate patch?

I think I'd like -kernel etc to be an incremental (= separate) patch,
because first I need to test it.

Thanks!
Laszlo

> 
> Thanks,
> Sunil
>> Laszlo
>>
>>>
>>> -Sunil
>>>
>>>> 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, *<platform_subdir>* should be *generic*". It does
>>>> not mention the build output pathname
>>>> "build/platform/generic/firmware/fw_dynamic.bin".
>>>>
>>>> Laszlo
>>>>
>>>
>>
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108487): https://edk2.groups.io/g/devel/message/108487
Mute This Topic: https://groups.io/mt/101216052/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to