Hi Carlo,

Thank you for the patch.

On Fri, Jul 31, 2026 at 10:29, Carlo Caione <[email protected]> wrote:

> Fastboot currently builds only for U-Boot proper, so its source and
> Makefile rules test CONFIG_FASTBOOT_* directly. The same checks would
> select U-Boot-proper options when these files are compiled for another
> phase, potentially compiling unavailable backends or using the wrong
> configuration values.
>
> Use CONFIG_IS_ENABLED(), CONFIG_VAL() and CONFIG_$(PHASE_) consistently
> for code and object selection. The empty phase prefix preserves the
> existing U-Boot-proper configuration and behavior while making the
> shared implementation safe to reuse from SPL.
>
> Signed-off-by: Julien Masson <[email protected]>
> Signed-off-by: Vitor Sato Eschholz <[email protected]>
> Signed-off-by: Carlo Caione <[email protected]>

Sorry for the review delays.

> ---
>  drivers/Makefile              |  2 +-
>  drivers/fastboot/Makefile     |  8 ++++----
>  drivers/fastboot/fb_block.c   |  9 ++++-----
>  drivers/fastboot/fb_command.c | 31 +++++++++++++++++--------------
>  drivers/fastboot/fb_common.c  |  4 ++--
>  drivers/fastboot/fb_getvar.c  | 14 +++++++-------
>  drivers/fastboot/fb_mmc.c     | 36 ++++++++++++++++++------------------

Shouldn't the newly created drivers/fastboot/fb_usb.c be converted as
well?
>From what I can see in there, we have:
IS_ENABLED(CONFIG_CMD_FASTBOOT_ABORT_KEYED) which should become:
CONFIG_IS_ENABLED(CMD_FASTBOOT_ABORT_KEYED)


>  7 files changed, 53 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 43d0ba33281..43d03479146 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -12,6 +12,7 @@ obj-$(CONFIG_$(PHASE_)DMA) += dma/
>  obj-$(CONFIG_$(PHASE_)DMA_LEGACY) += dma/
>  obj-$(CONFIG_$(PHASE_)DFU) += dfu/
>  obj-$(CONFIG_$(PHASE_)EXTCON) += extcon/
> +obj-$(CONFIG_$(PHASE_)FASTBOOT) += fastboot/
>  obj-$(CONFIG_$(PHASE_)GPIO) += gpio/
>  obj-$(CONFIG_$(PHASE_)DRIVERS_MISC) += misc/
>  obj-$(CONFIG_$(PHASE_)SYSRESET) += sysreset/
> @@ -93,7 +94,6 @@ obj-y += block/
>  obj-y += cache/
>  obj-$(CONFIG_CPU) += cpu/
>  obj-y += crypto/
> -obj-$(CONFIG_FASTBOOT) += fastboot/
>  obj-$(CONFIG_FWU_MDATA) += fwu-mdata/
>  obj-y += misc/
>  obj-$(CONFIG_MMC) += mmc/
> diff --git a/drivers/fastboot/Makefile b/drivers/fastboot/Makefile
> index 32e8e072c88..12008ac05e2 100644
> --- a/drivers/fastboot/Makefile
> +++ b/drivers/fastboot/Makefile
> @@ -4,8 +4,8 @@ obj-y += fb_common.o
>  obj-y += fb_getvar.o
>  obj-y += fb_command.o
>  obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += fb_usb.o

Same question here, should CONFIG_USB_FUNCTION_FASTBOOT move to a phase
specific as well?

The rest looks good.
Thanks
Mattijs

Reply via email to