public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Jones" <ajones@ventanamicro.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	 Andrei Warkentin <andrei.warkentin@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Gerd Hoffmann <kraxel@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	 Jordan Justen <jordan.l.justen@intel.com>,
	Sunil V L <sunilvl@ventanamicro.com>
Subject: Re: [edk2-devel] [PATCH 3/3] OvmfPkg/RiscVVirt/README: document direct kernel boot
Date: Thu, 14 Sep 2023 09:24:02 +0200	[thread overview]
Message-ID: <20230914-cf5605139eaeecd33cba1d2a@orel> (raw)
In-Reply-To: <20230913105551.12680-4-lersek@redhat.com>

On Wed, Sep 13, 2023 at 12:55:51PM +0200, Laszlo Ersek wrote:
> Direct (fw_cfg) kernel boot works on the RiscVVirt firmware platform too;
> I've tested it after extracting the kernel, initrd, and kernel command
> line from "openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw". Document this
> type of boot, because at least historically, fw_cfg kernel boot was
> implemented differently between OVMF and ArmVirtQemu. Thanks: Drew, Sunil.
> 
> Cc: Andrei Warkentin <andrei.warkentin@intel.com>
> Cc: Andrew Jones <ajones@ventanamicro.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>
> ---
>  OvmfPkg/RiscVVirt/README.md | 33 +++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md
> index 1dba1a26af2d..47b97dd64a2f 100644
> --- a/OvmfPkg/RiscVVirt/README.md
> +++ b/OvmfPkg/RiscVVirt/README.md
> @@ -75,8 +75,39 @@ Below example shows how to boot openSUSE Tumbleweed E20.
>      Currently, `acpi=off` is recommended unless you are developing ACPI support
>      yourself.
>  
> +3) Running QEMU with direct kernel boot
> +
> +    The following example boots the same guest, but loads the kernel image and
> +    the initial RAM disk (which were extracted from
> +    `openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw`) from the host filesystem.
> +    It also sets the guest kernel command line on the QEMU command line.
> +
> +        CMDLINE=(root=UUID=76d9b92d-09e9-4df0-8262-c1a7a466f2bc
> +                 systemd.show_status=1
> +                 ignore_loglevel
> +                 console=ttyS0
> +                 earlycon=uart8250,mmio,0x10000000)
> +
> +        qemu-system-riscv64 \
> +        -M virt,pflash0=pflash0,pflash1=pflash1,acpi=off \
> +        -m 4096 -smp 2 \
> +        -serial mon:stdio \
> +        -device virtio-gpu-pci -full-screen \
> +        -device qemu-xhci \
> +        -device usb-kbd \
> +        -device virtio-rng-pci \
> +        -blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
> +        -blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
> +        -netdev user,id=net0 \
> +        -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 \
> +        -kernel Image-6.5.2-1-default \
> +        -initrd initrd-6.5.2-1-default \
> +        -append "${CMDLINE[*]}"
> +
>  ## Test with your own OpenSBI binary
> -Using the above QEMU command line, **RISCV_VIRT_CODE.fd** is launched by the
> +Using the above QEMU command lines, **RISCV_VIRT_CODE.fd** is launched by the
>  OpenSBI binary that is bundled with QEMU. You can build your own OpenSBI binary
>  as well:
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108639): https://edk2.groups.io/g/devel/message/108639
Mute This Topic: https://groups.io/mt/101334266/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-09-14  7:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 10:55 [edk2-devel] [PATCH 0/3] updates for "OvmfPkg/RiscVVirt/README.md" Laszlo Ersek
2023-09-13 10:55 ` [edk2-devel] [PATCH 1/3] OvmfPkg/RiscVVirt/README: explain that "-bios" is only useful with TCG Laszlo Ersek
2023-09-13 16:28   ` Andrew Jones
2023-09-14  7:59     ` Laszlo Ersek
2023-09-14  7:23   ` Andrew Jones
2023-09-14  7:25     ` Andrew Jones
2023-09-13 10:55 ` [edk2-devel] [PATCH 2/3] OvmfPkg/RiscVVirt/README: explain the "acpi=off" machine property Laszlo Ersek
2023-09-13 11:02   ` Ard Biesheuvel
2023-09-13 11:09     ` Sunil V L
2023-09-13 13:33     ` Laszlo Ersek
2023-09-14  7:23   ` Andrew Jones
2023-09-13 10:55 ` [edk2-devel] [PATCH 3/3] OvmfPkg/RiscVVirt/README: document direct kernel boot Laszlo Ersek
2023-09-14  7:24   ` Andrew Jones [this message]
2023-09-14  9:05 ` [edk2-devel] [PATCH 0/3] updates for "OvmfPkg/RiscVVirt/README.md" Sunil V L
2023-09-14  9:17   ` Laszlo Ersek
2023-09-14 10:55 ` Laszlo Ersek
2023-09-14 12:47   ` Sunil V L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230914-cf5605139eaeecd33cba1d2a@orel \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox