* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-07 14:58 [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI Laszlo Ersek
@ 2023-09-07 15:13 ` Laszlo Ersek
2023-09-07 19:02 ` Andrei Warkentin
` (3 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-07 15:13 UTC (permalink / raw)
To: edk2-devel-groups-io
Cc: Andrei Warkentin, Ard Biesheuvel, Gerd Hoffmann, Jiewen Yao,
Jordan Justen, Sunil V L
On 9/7/23 16:58, Laszlo Ersek wrote:
> Explain how users can compose their pre-OS environment purely from
> binaries they've built themselves.
>
> Cc: Andrei Warkentin <andrei.warkentin@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Laszlo Ersek <lersek@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
> +
> +then specify that binary for QEMU, with the following additional command line
> +option:
> +
> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
Further tweaks on the horizon (for v2, or on top), highlighted by Drew
Jones:
- explain -kernel/-initrd/-append (after testing it, of course! I'm
unsure if fw_cfg kernel boot actually works with RiscVVirt!)
- point out that -bios (OpenSBI) makes no difference under KVM, as KVM
services those SBI ecalls
- explain "acpi=off" (in the context, not in the added text): Linux
support (i.e. the ACPI *consumer* side) is still under development /
work in progress.
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108400): https://edk2.groups.io/g/devel/message/108400
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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-07 14:58 [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI Laszlo Ersek
2023-09-07 15:13 ` Laszlo Ersek
@ 2023-09-07 19:02 ` Andrei Warkentin
2023-09-08 6:13 ` Sunil V L
` (2 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Andrei Warkentin @ 2023-09-07 19:02 UTC (permalink / raw)
To: Laszlo Ersek, edk2-devel-groups-io
Cc: Ard Biesheuvel, Gerd Hoffmann, Yao, Jiewen, Justen, Jordan L,
Sunil V L
This looks fine to me as far as an edit, but I didn't validate the commands.
Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com>
> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, September 7, 2023 9:58 AM
> To: lersek@redhat.com; edk2-devel-groups-io <devel@edk2.groups.io>
> Cc: Warkentin, Andrei <andrei.warkentin@intel.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>; Gerd Hoffmann <kraxel@redhat.com>; Yao,
> Jiewen <jiewen.yao@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Sunil V L <sunilvl@ventanamicro.com>
> Subject: [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own
> OpenSBI
>
> Explain how users can compose their pre-OS environment purely from
> binaries they've built themselves.
>
> Cc: Andrei Warkentin <andrei.warkentin@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Laszlo Ersek <lersek@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
> +
> +then specify that binary for QEMU, with the following additional
> +command line
> +option:
> +
> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108413): https://edk2.groups.io/g/devel/message/108413
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-07 14:58 [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI Laszlo Ersek
2023-09-07 15:13 ` Laszlo Ersek
2023-09-07 19:02 ` Andrei Warkentin
@ 2023-09-08 6:13 ` Sunil V L
2023-09-11 5:32 ` Laszlo Ersek
2023-09-11 13:40 ` Sunil V L
2023-09-12 6:23 ` Sunil V L
4 siblings, 1 reply; 16+ messages in thread
From: Sunil V L @ 2023-09-08 6:13 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Laszlo Ersek <lersek@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.
Thanks,
Sunil
> +then specify that binary for QEMU, with the following additional command line
> +option:
> +
> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108439): https://edk2.groups.io/g/devel/message/108439
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-08 6:13 ` Sunil V L
@ 2023-09-11 5:32 ` Laszlo Ersek
2023-09-11 5:45 ` Sunil V L
2023-09-11 6:15 ` Laszlo Ersek
0 siblings, 2 replies; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-11 5:32 UTC (permalink / raw)
To: Sunil V L
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>> Signed-off-by: Laszlo Ersek <lersek@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?
Laszlo
>
> Thanks,
> Sunil
>> +then specify that binary for QEMU, with the following additional command line
>> +option:
>> +
>> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108476): https://edk2.groups.io/g/devel/message/108476
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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 5:32 ` Laszlo Ersek
@ 2023-09-11 5:45 ` Sunil V L
2023-09-11 6:15 ` Laszlo Ersek
1 sibling, 0 replies; 16+ messages in thread
From: Sunil V L @ 2023-09-11 5:45 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
On Mon, Sep 11, 2023 at 07:32:06AM +0200, 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.warkentin@intel.com>
> >> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> >> Cc: Gerd Hoffmann <kraxel@redhat.com>
> >> Cc: Jiewen Yao <jiewen.yao@intel.com>
> >> Cc: Jordan Justen <jordan.l.justen@intel.com>
> >> Cc: Sunil V L <sunilvl@ventanamicro.com>
> >> Signed-off-by: Laszlo Ersek <lersek@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?
>
Hi Laszlo,
Yes, I think providing the URL is a good idea.
Thanks,
Sunil
> Laszlo
>
> >
> > Thanks,
> > Sunil
> >> +then specify that binary for QEMU, with the following additional command line
> >> +option:
> >> +
> >> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
> >
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108477): https://edk2.groups.io/g/devel/message/108477
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 5:32 ` Laszlo Ersek
2023-09-11 5:45 ` Sunil V L
@ 2023-09-11 6:15 ` Laszlo Ersek
2023-09-11 6:22 ` Sunil V L
1 sibling, 1 reply; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-11 6:15 UTC (permalink / raw)
To: Sunil V L
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>>> Signed-off-by: Laszlo Ersek <lersek@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.
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 (#108478): https://edk2.groups.io/g/devel/message/108478
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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 6:15 ` Laszlo Ersek
@ 2023-09-11 6:22 ` Sunil V L
2023-09-11 7:07 ` Laszlo Ersek
0 siblings, 1 reply; 16+ messages in thread
From: Sunil V L @ 2023-09-11 6:22 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
> >>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> >>> Cc: Gerd Hoffmann <kraxel@redhat.com>
> >>> Cc: Jiewen Yao <jiewen.yao@intel.com>
> >>> Cc: Jordan Justen <jordan.l.justen@intel.com>
> >>> Cc: Sunil V L <sunilvl@ventanamicro.com>
> >>> Signed-off-by: Laszlo Ersek <lersek@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?
-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 (#108479): https://edk2.groups.io/g/devel/message/108479
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 6:22 ` Sunil V L
@ 2023-09-11 7:07 ` Laszlo Ersek
2023-09-11 10:15 ` Sunil V L
0 siblings, 1 reply; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-11 7:07 UTC (permalink / raw)
To: Sunil V L
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
>>>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>>>>> Signed-off-by: Laszlo Ersek <lersek@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?
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 (#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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 7:07 ` Laszlo Ersek
@ 2023-09-11 10:15 ` Sunil V L
2023-09-11 13:16 ` Laszlo Ersek
0 siblings, 1 reply; 16+ messages in thread
From: Sunil V L @ 2023-09-11 10:15 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
> >>>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> >>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
> >>>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
> >>>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
> >>>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
> >>>>> Signed-off-by: Laszlo Ersek <lersek@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?
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 (#108483): https://edk2.groups.io/g/devel/message/108483
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-11 10:15 ` Sunil V L
@ 2023-09-11 13:16 ` Laszlo Ersek
0 siblings, 0 replies; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-11 13:16 UTC (permalink / raw)
To: Sunil V L
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
>>>>>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>>>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>>>>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>>>>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>>>>>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>>>>>>> Signed-off-by: Laszlo Ersek <lersek@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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-07 14:58 [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI Laszlo Ersek
` (2 preceding siblings ...)
2023-09-08 6:13 ` Sunil V L
@ 2023-09-11 13:40 ` Sunil V L
2023-09-12 6:23 ` Sunil V L
4 siblings, 0 replies; 16+ messages in thread
From: Sunil V L @ 2023-09-11 13:40 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Laszlo Ersek <lersek@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
> +
> +then specify that binary for QEMU, with the following additional command line
> +option:
> +
> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Thanks!
Sunil
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108488): https://edk2.groups.io/g/devel/message/108488
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-07 14:58 [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI Laszlo Ersek
` (3 preceding siblings ...)
2023-09-11 13:40 ` Sunil V L
@ 2023-09-12 6:23 ` Sunil V L
2023-09-12 6:56 ` Ard Biesheuvel
2023-09-12 8:20 ` Laszlo Ersek
4 siblings, 2 replies; 16+ messages in thread
From: Sunil V L @ 2023-09-12 6:23 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
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.warkentin@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>
Merged as #4821
> 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
> +
> +then specify that binary for QEMU, with the following additional command line
> +option:
> +
> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108514): https://edk2.groups.io/g/devel/message/108514
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-12 6:23 ` Sunil V L
@ 2023-09-12 6:56 ` Ard Biesheuvel
2023-09-12 8:07 ` Sunil V L
2023-09-12 8:20 ` Laszlo Ersek
1 sibling, 1 reply; 16+ messages in thread
From: Ard Biesheuvel @ 2023-09-12 6:56 UTC (permalink / raw)
To: devel, sunilvl
Cc: Laszlo Ersek, Andrei Warkentin, Ard Biesheuvel, Gerd Hoffmann,
Jiewen Yao, Jordan Justen
On Tue, 12 Sept 2023 at 08:23, Sunil V L <sunilvl@ventanamicro.com> wrote:
>
> 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.warkentin@intel.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Sunil V L <sunilvl@ventanamicro.com>
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > ---
> >
> Merged as #4821
>
Thanks for taking care of this.
Mind sending a patch to change your R: into M: for OvmfPkg/RiscVVirt
in Maintainers? That would reflect reality a bit better :-)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108515): https://edk2.groups.io/g/devel/message/108515
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-12 6:56 ` Ard Biesheuvel
@ 2023-09-12 8:07 ` Sunil V L
0 siblings, 0 replies; 16+ messages in thread
From: Sunil V L @ 2023-09-12 8:07 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: devel, Laszlo Ersek, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
On Tue, Sep 12, 2023 at 08:56:19AM +0200, Ard Biesheuvel wrote:
> On Tue, 12 Sept 2023 at 08:23, Sunil V L <sunilvl@ventanamicro.com> wrote:
> >
> > 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.warkentin@intel.com>
> > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > > Cc: Sunil V L <sunilvl@ventanamicro.com>
> > > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > > ---
> > >
> > Merged as #4821
> >
>
> Thanks for taking care of this.
>
> Mind sending a patch to change your R: into M: for OvmfPkg/RiscVVirt
> in Maintainers? That would reflect reality a bit better :-)
Sure!
Thanks,
Sunil
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108518): https://edk2.groups.io/g/devel/message/108518
Mute This Topic: https://groups.io/mt/101216052/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/RiscVVirt/README.md: bring your own OpenSBI
2023-09-12 6:23 ` Sunil V L
2023-09-12 6:56 ` Ard Biesheuvel
@ 2023-09-12 8:20 ` Laszlo Ersek
1 sibling, 0 replies; 16+ messages in thread
From: Laszlo Ersek @ 2023-09-12 8:20 UTC (permalink / raw)
To: Sunil V L
Cc: edk2-devel-groups-io, Andrei Warkentin, Ard Biesheuvel,
Gerd Hoffmann, Jiewen Yao, Jordan Justen
On 9/12/23 08:23, Sunil V L wrote:
> 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.warkentin@intel.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Sunil V L <sunilvl@ventanamicro.com>
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>
> Merged as #4821
Thank you!
Laszlo
>
>> 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
>> +
>> +then specify that binary for QEMU, with the following additional command line
>> +option:
>> +
>> + -bios $OPENSBI_DIR/build/platform/generic/firmware/fw_dynamic.bin
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108520): https://edk2.groups.io/g/devel/message/108520
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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 16+ messages in thread