[PATCH 05/13] doc: Add a description for bootmeth_qfw

Simon Glass sjg at chromium.org
Tue Jul 16 09:04:43 CEST 2024


Hi Heinrich,

On Mon, 15 Jul 2024 at 23:56, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 7/15/24 12:13, Simon Glass wrote:
> > Add documentation for the qfw bootmeth.
> >
>
> %s/bootmeth/boot method/
>
>
> > Fix up the compatible string to drop the 'extlinux' part, which is not
> > relevant to this bootmeth.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >   boot/bootmeth_qfw.c              |  2 +-
> >   doc/develop/bootstd/index.rst    |  1 +
> >   doc/develop/bootstd/overview.rst |  1 +
> >   doc/develop/bootstd/qfw.rst      | 21 +++++++++++++++++++++
> >   4 files changed, 24 insertions(+), 1 deletion(-)
> >   create mode 100644 doc/develop/bootstd/qfw.rst
> >
> > diff --git a/boot/bootmeth_qfw.c b/boot/bootmeth_qfw.c
> > index dfaa944594e..2f8e00cf350 100644
> > --- a/boot/bootmeth_qfw.c
> > +++ b/boot/bootmeth_qfw.c
> > @@ -88,7 +88,7 @@ static struct bootmeth_ops qfw_bootmeth_ops = {
> >   };
> >
> >   static const struct udevice_id qfw_bootmeth_ids[] = {
> > -     { .compatible = "u-boot,qfw-extlinux" },
> > +     { .compatible = "u-boot,qfw-bootmeth" },
> >       { }
> >   };
> >
> > diff --git a/doc/develop/bootstd/index.rst b/doc/develop/bootstd/index.rst
> > index 5052afe448f..f8fce7207ce 100644
> > --- a/doc/develop/bootstd/index.rst
> > +++ b/doc/develop/bootstd/index.rst
> > @@ -9,3 +9,4 @@ Standard Boot
> >      overview
> >      extlinux
> >      pxelinux
> > +   qfw
> > diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst
> > index fd0692daf0d..bcc2c00c775 100644
> > --- a/doc/develop/bootstd/overview.rst
> > +++ b/doc/develop/bootstd/overview.rst
> > @@ -418,6 +418,7 @@ Bootmeth drivers are provided for:
> >      - EFI boot using bootefi from disk
> >      - VBE
> >      - EFI boot using boot manager
> > +   - :doc:`QFW <qfw>`: QEMU firmware interface
> >
> >
> >   Command interface
> > diff --git a/doc/develop/bootstd/qfw.rst b/doc/develop/bootstd/qfw.rst
> > new file mode 100644
> > index 00000000000..b0d47fd246a
> > --- /dev/null
> > +++ b/doc/develop/bootstd/qfw.rst
> > @@ -0,0 +1,21 @@
> > +.. SPDX-License-Identifier: GPL-2.0+:
> > +
> > +QFW Bootmeth
> > +============
> > +
> > +`QEMU <hhttps://www.qemu.org/>`_ is a system emulator which is able to boot
> > +Operating Systems. QEMU provides specific support for booting an OS image
> > +provided on the QEMU command line.
> > +
> > +When invoked on a bootdev for UCLASS_QFW, this bootmeth reads the kernel
> > +provided by the QEMU `-kernel` argument, the iniital ramdisk and provided by
>
> %s/iniital/initial/
>
> > +`-initrd` and the boot arguments (command line) provided by `-append` into
> > +memory ready for booting.
> > +
> > +When the bootflow is booted, the bootmeth tries the `booti` command first, then
>
> Boot methods should work if the command line is deactivated. We should
> not use run_command() but extract the functionality into library code.
>
> Why would you first try to run booti and then bootz irrespective of the
> availability of the commands? Function qfw_boot() needs rework.

Yes, this is just the existing code ported into a bootmeth. I have not
tried to rework it, but it would be a good idea now that I have done
all the work of separating out booting from cmdline.

>
> There should be a configuration symbol to disable the boot method when
> CONFIG_QFW is enabled.
>
> The bootmethod should no be built if booti and bootz are not available
>
> > +falls back to the `bootz` command. U-Boot's 'control' devicetree is passed
> > +through to the kernel.
> > +
> > +The compatible string "u-boot,qfw-bootmeth" is used for the driver. The driver
> > +is automatically instantiated if there are no bootmeth drivers in the
> > +devicetree.
>
> This paragraph should be moved to the overview.
>
> Please, mention the configuration requirements.
Regards,
Simon


More information about the U-Boot mailing list