All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Alexey Romanov <avromanov@salutedevices.com>,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>
Cc: "sjg@chromium.org" <sjg@chromium.org>, "hs@denx.de" <hs@denx.de>,
	"sean.anderson@seco.com" <sean.anderson@seco.com>,
	"dimorinny@google.com" <dimorinny@google.com>,
	"patrick.delaunay@foss.st.com" <patrick.delaunay@foss.st.com>,
	kernel <kernel@sberdevices.ru>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Re: [PATCH v4 1/1] fastboot: introduce 'oem board' subcommand
Date: Wed, 10 Apr 2024 14:56:22 +0200	[thread overview]
Message-ID: <874jc9js09.fsf@baylibre.com> (raw)
In-Reply-To: <20240410124257.3zc673n2jb3msiep@cab-wsm-0029881.sigma.sbrf.ru>

Hi Alexey,

On mer., avril 10, 2024 at 12:43, Alexey Romanov <avromanov@salutedevices.com> wrote:

> 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 <avromanov@salutedevices.com>
>> > Reviewed-by: Mattijs Korpershoek <mkorpershoek@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 :)

Yes, if there are no other review comments, I will fix this up locally
when picking this up.

>
>> 
>> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>> 
>> Thanks,
>> Quentin
>
> -- 
> Thank you,
> Alexey

  reply	other threads:[~2024-04-10 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 10:58 [PATCH v4 0/1] Introduce fastboot oem board command Alexey Romanov
2024-04-10 10:58 ` [PATCH v4 1/1] fastboot: introduce 'oem board' subcommand Alexey Romanov
2024-04-10 12:02   ` Quentin Schulz
2024-04-10 12:43     ` Alexey Romanov
2024-04-10 12:56       ` Mattijs Korpershoek [this message]
2024-04-18  9:06   ` Mattijs Korpershoek

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-all 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=874jc9js09.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=avromanov@salutedevices.com \
    --cc=dimorinny@google.com \
    --cc=hs@denx.de \
    --cc=kernel@sberdevices.ru \
    --cc=patrick.delaunay@foss.st.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.