[PATCH] fastboot: add UUU command UCmd and ACmd support

Simon Glass sjg at chromium.org
Wed Jan 13 17:10:33 CET 2021


Hi Heiko,

On Mon, 11 Jan 2021 at 03:19, Heiko Schocher <hs at denx.de> wrote:
>
> add support for the UUU commands ACmd and UCmd.
>
> Enable them through the Kconfig option
> CONFIG_FASTBOOT_UUU_SUPPORT
>
> base was commit in NXP kernel
> 9b149c2a2882: ("MLK-18591-3 android: Add FSL android fastboot support")
>
> and ported it to current mainline. Tested this patch
> on imx6ul based board.
>
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
> azure build:
> https://dev.azure.com/hs0298/hs/_build/results?buildId=57&view=results
>
> version uuu tool used for tests:
> commit 3870fb781b35: ("fastboot: default to logical-block-size 4096")
>
>  doc/android/fastboot-protocol.rst |  5 +++
>  doc/android/fastboot.rst          |  2 +
>  drivers/fastboot/Kconfig          |  7 ++++
>  drivers/fastboot/fb_command.c     | 62 +++++++++++++++++++++++++++++++
>  drivers/usb/gadget/f_fastboot.c   | 17 +++++++++
>  include/fastboot.h                |  7 ++++
>  6 files changed, 100 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>

You can try to use if() for the CONFIG options here. See for example
vid_console_color().

It is sometimes possible to do this, too, but it is a bit riskier:

switch (xxx) {
case SOMETHING:
    if (CONFIG_IS_ENABLED...) {
       do stuff if this feature is enabled
        break;
    }
    /* no break */
default:
    /* not supported */
}

Regards,
Simon


More information about the U-Boot mailing list