Re: [PATCH v2 4/4] x86: Add qemu documentation for running as flash binary

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot.general,gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTis3580-r0-P8LaF=YR=vufBSRjEttsmb1JGnV5RCK5mw@mail.gmail.com>
Hi Elliot,

On 2026-08-07T18:07:09, Elliot Berman <[email protected]> wrote:
> x86: Add qemu documentation for running as flash binary
>
> Provide guidance for testing capsule updates on x86/x86_64.
>
> Signed-off-by: Elliot Berman <[email protected]>
>
> doc/board/emulation/qemu-x86.rst | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

>     Provide guidance for testing capsule updates on x86/x86_64.

The section stops after launching QEMU, so it does not show how to
test a capsule update. Please can you add the remaining steps -
generating a capsule with mkeficapsule using the GUIDs from patch 2
and applying it via capsule-on-disk - or at least reference the
capsule-update section in doc/develop/uefi/uefi.rst?

> diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
> @@ -113,6 +113,23 @@ sure the specified CPU supports 64-bit like '-cpu core2duo'. Conversely
> +Invoke QEMU with:
> +
> +.. code-block:: bash
> +
> +   qemu-system-x86_64 -drive if=pflash,format=raw,file=path/to/u-boot.rom,readonly=off

The rest of this file uses plain '::' literal blocks with a '$ '
prefix for commands - do you want to match that style? It would also
help to say that -drive if=pflash replaces the -bios option used
elsewhere in the document, since that is the key difference here, and
that qemu-system-i386 is used for the 32-bit build, matching the
earlier examples.

> diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
> @@ -113,6 +113,23 @@ sure the specified CPU supports 64-bit like '-cpu core2duo'. Conversely
> +To create a U-Boot binary that can accept capsule updates, build
> +qemu-x86_64_defconfig or qemu-x86_defconfig with::

Just to check, is CONFIG_EFI_RUNTIME_UPDATE_CAPSULE actually needed?
Capsule-on-disk works without the runtime UpdateCapsule() service, so
if the intent is just the on-disk flow it could be dropped. If it is
needed, a brief note on why would help the reader.

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.