On Fri, Oct 30, 2026 at 11:45:42AM +0530, Sumit Singh Dhami wrote: > Read the VendorDtbOverlays EFI variable when the vendor_dtbo environment > variable is unavailable. Use the EFI-provided overlay identifiers during > FIT multi-DTB configuration matching. > > Move QCOM FIT multi-DTB selection to EVT_POST_PREBOOT so EFI variables > can be initialized successfully before they are read. > > Signed-off-by: Sumit Singh Dhami <[email protected]> > --- > This patch extends the FIT multi-DTB support introduced by Aswin Murugan's > series: > https://lore.kernel.org/u-boot/[email protected]/ > --- > arch/arm/mach-snapdragon/board.c | 6 - > arch/arm/mach-snapdragon/qcom_fit_multidtb.c | 175 +++++++++++++++++-- > arch/arm/mach-snapdragon/qcom_fit_multidtb.h | 18 -- > 3 files changed, 161 insertions(+), 38 deletions(-) > > diff --git a/arch/arm/mach-snapdragon/board.c > b/arch/arm/mach-snapdragon/board.c > index 9bfb7183241..055ef6b8221 100644 > --- a/arch/arm/mach-snapdragon/board.c > +++ b/arch/arm/mach-snapdragon/board.c > @@ -453,11 +453,5 @@ int board_late_init(void) > /* Configure the dfu_string for capsule updates */ > qcom_configure_capsule_updates(); > > - /* Try FIT multi-DTB selection if enabled */ > - if (IS_ENABLED(CONFIG_QCOM_FIT_MULTIDTB)) { > - if (qcom_fit_multidtb_setup()) > - log_debug("FIT multi-DTB selection not available or > failed\n"); > - } > - > return 0; > } > diff --git a/arch/arm/mach-snapdragon/qcom_fit_multidtb.c > b/arch/arm/mach-snapdragon/qcom_fit_multidtb.c > index 45423910d34..40f660b453b 100644 > --- a/arch/arm/mach-snapdragon/qcom_fit_multidtb.c > +++ b/arch/arm/mach-snapdragon/qcom_fit_multidtb.c > @@ -27,6 +27,11 @@ > #include "qcom_fit_multidtb.h" > #include "qcom_hwdetect.h" > > +#if CONFIG_IS_ENABLED(EFI_VARIABLE_FILE_STORE) > +#include <efi_loader.h> > +#include <efi_variable.h> > +#endif > + > /* GPT partition name containing the FIT image */ > #define QCOM_FIT_PARTNAME "dtb_a" > > @@ -60,6 +65,10 @@ > #define PROP_FDT "fdt" > #define PROP_DATA "data" > > +#if CONFIG_IS_ENABLED(EFI_VARIABLE_FILE_STORE) > +#define QCOM_VENDOR_DTBO_EFIVAR_MAX_LEN 256 > +#endif > + > /** > * struct overlay_entry - Gathered overlay FDT image info > * @name: Overlay image name in the FIT
Neither of these guards should be needed.
> @@ -1029,5 +1168,13 @@ cleanup_fit:
> if (fit)
> free(fit);
>
> - return ret;
> + if (ret)
> + log_err("FIT multi-DTB selection not available or failed\n");
> +
> + return 0;
> }
> +
> +/* Try FIT multi-DTB selection if enabled */
> +#if CONFIG_IS_ENABLED(QCOM_FIT_MULTIDTB)
> +EVENT_SPY_SIMPLE(EVT_POST_PREBOOT, qcom_fit_multidtb_setup);
> +#endif
Why is this guarded by itself? It should either be by the function
that's also guarded, or EVENT should be select'd. Seeing that we're at
around line 1100 now, possibly some file split and broken up, too,
first.
--
Tom
signature.asc
Description: PGP signature
