On Fri, Jun 06, 2025 at 11:33:09AM +0200, Neil Armstrong wrote:

> From: Dmitrii Merkurev <dimori...@google.com>
> 
> 1. Get partition info/size
> 2. Erase partition
> 3. Flash partition
> 4. BCB
> 
> Signed-off-by: Dmitrii Merkurev <dimori...@google.com>
> Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com>
> Tested-by: Mattijs Korpershoek <mkorpersh...@kernel.org>
> Signed-off-by: Neil Armstrong <neil.armstr...@linaro.org>
> ---
>  drivers/fastboot/Kconfig      | 29 ++++++++++++++++++++++++++++-
>  drivers/fastboot/Makefile     |  1 +
>  drivers/fastboot/fb_command.c |  8 ++++++++
>  drivers/fastboot/fb_common.c  | 22 ++++++++++++++++++----
>  drivers/fastboot/fb_getvar.c  |  8 +++++++-
>  5 files changed, 62 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index 
> 70207573de2bd0d56b4b7fa6f7e17fdc5803ba15..75911468ba4980d9b96e2af9e708f08b9ef16ac8
>  100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -91,7 +91,7 @@ config FASTBOOT_USB_DEV
>  config FASTBOOT_FLASH
>       bool "Enable FASTBOOT FLASH command"
>       default y if ARCH_SUNXI || ARCH_ROCKCHIP
> -     depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
> +     depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS) || BLK

This is what's tricky. The symbol FASTBOOT_FLASH is default y for all
ARCH_SUNXI and ARCH_ROCKCHIP platforms where FASTBOOT is enabled. Since
looking in to effects here isn't super well documented, I'm going to be
a bit more verbose here than I might otherwise just to have a post to
refer back to later (possibly for adding to something under
doc/develop/).

So, tools/qconfig.py can be helpful here. If we use -b to first build
the database of boards and CONFIG sybmols enabled, we can then do:
$ tools/qconfig.py -f FASTBOOT ARCH_SUNXI BLK
to get everything that is FASTBOOT and ARCH_SUNXI and BLK.
We can also do:
$ tools/qconfig.py -f FASTBOOT ARCH_SUNXI BLK ~FASTBOOT_FLASH
To get the same as the above, but do not enable FASTBOOT_FLASH. This
gives us the CHIP platform. This is going to be the one that now enables
the new functionality. If we do the same but for ARCH_ROCKCHIP we get
zero matches. So this is our culprit.

This means the series, and this patch here needs to also disable the new
functionality on the CHIP defconfig.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to