Hi guys,

On Wed, Apr 10, 2024 at 02:02:21PM +0200, Quentin Schulz wrote:
> Hi Alexey,
> 
> On 4/10/24 12:58, Alexey Romanov wrote:
> > Currently, fastboot protocol in U-Boot has no opportunity
> > to execute vendor custom code with verifed boot. This patch
> > introduce new fastboot subcommand fastboot oem board:<cmd>,
> > which allow to run custom oem_board function.
> > 
> > Default implementation is __weak. Vendor must redefine it in
> > board/ folder with his own logic.
> > 
> > For example, some vendors have their custom nand/emmc partition
> > flashing or erasing. Here some typical command for such use cases:
> > 
> > - flashing:
> > 
> >    $ fastboot stage bootloader.img
> >    $ fastboot oem board:write_bootloader
> > 
> > - erasing:
> > 
> >    $ fastboot oem board:erase_env
> > 
> > Signed-off-by: Alexey Romanov <avroma...@salutedevices.com>
> > Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com>
> > ---
> >   doc/android/fastboot.rst      | 18 ++++++++++++++++++
> >   drivers/fastboot/Kconfig      |  7 +++++++
> >   drivers/fastboot/fb_command.c | 30 ++++++++++++++++++++++++++++++
> >   include/fastboot.h            |  1 +
> >   4 files changed, 56 insertions(+)
> > 
> > diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
> > index 1ad8a897c8..2a627f9890 100644
> > --- a/doc/android/fastboot.rst
> > +++ b/doc/android/fastboot.rst
> > @@ -29,6 +29,7 @@ The following OEM commands are supported (if enabled):
> >     with <arg> = boot_ack boot_partition
> >   - ``oem bootbus``  - this executes ``mmc bootbus %x %s`` to configure eMMC
> >   - ``oem run`` - this executes an arbitrary U-Boot command
> > +- ``oem board`` - this executes a custom board function which is defined 
> > by the vendor
> >   Support for both eMMC and NAND devices is included.
> > @@ -245,6 +246,23 @@ including multiple commands (using e.g. ``;`` or 
> > ``&&``) and control structures
> >   (``if``, ``while``, etc.). The exit code of ``fastboot`` will reflect the 
> > exit
> >   code of the command you ran.
> > +Running Custom Vendor Code
> > +^^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +U-Boot allows you to execute custom fastboot logic, which can be defined
> > +in board/ files. It can still be used for production devices with verified
> > +boot, because the vendor define logic at compile time by implementing
> 
> I think it should be "defines" here?

Yep. If there are no more comments, maybe Mattijs will correct this when
he picks up a patch? So that I don't send a new series with typo fix :)

> 
> Reviewed-by: Quentin Schulz <quentin.sch...@theobroma-systems.com>
> 
> Thanks,
> Quentin

-- 
Thank you,
Alexey

Reply via email to