On 22/07/2026 09:41, Varadarajan Narayanan wrote:
> The boot rom expects the secondary boot loader in MBN format followed by
> the TME executable. Add rules to board/qualcomm/config.mk to create
> u-boot-spl.mbn and u-boot-spl.melf.

For which SoC families/generations?

> 
> u-boot-spl.melf is the combined multi-elf file that has u-boot-spl.mbn
> followed by the TME executable.

It's intentional that mkmbn is invoked twice and things are nested?
> 
> Additionally, this patch adds a config option to specify the path
> of the TME executable to be used to create u-boot-spl.melf.
> 
> Signed-off-by: Varadarajan Narayanan <[email protected]>
> ---
>  arch/arm/mach-snapdragon/Kconfig |  7 +++++++
>  board/qualcomm/config.mk         | 23 +++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
> 
> diff --git a/arch/arm/mach-snapdragon/Kconfig 
> b/arch/arm/mach-snapdragon/Kconfig
> index ddded0029ef..f1a6e828c3c 100644
> --- a/arch/arm/mach-snapdragon/Kconfig
> +++ b/arch/arm/mach-snapdragon/Kconfig
> @@ -59,6 +59,13 @@ config QCOM_GENERATE_MBN
>         New platforms can be added to tools/qcom/mkmbn/mkmbn.py if they 
> aren't already
>         supported.
>  
> +config QCOM_TMEL_ELF
> +     string "TME Elf to concatenate with U-Boot SPL MBN image"
> +     depends on SPL

depends on QCOM_GENERATE_MBN

> +     help
> +       Path of the TME Elf file to be concatenated to u-boot.mbn to create
> +       boot rom expected multi-elf image
> +
>  choice
>       prompt "Qualcomm boot0.h workaround"
>       optional
> diff --git a/board/qualcomm/config.mk b/board/qualcomm/config.mk
> index 769e4a51ca0..2abecbf8ea5 100644
> --- a/board/qualcomm/config.mk
> +++ b/board/qualcomm/config.mk
> @@ -12,3 +12,26 @@ quiet_cmd_mkmbn = MBN     $@
>  
>  u-boot.mbn: u-boot.bin FORCE
>       $(call if_changed,mkmbn)
> +
> +ifeq ($(CONFIG_QCOM_GENERATE_MBN),y)
> +
> +quiet_cmd_mksplmbn = SPLMBN     $@
> +      cmd_mksplmbn = $(CMD_MKMBN) -o spl/u-boot-spl.mbn -l 
> $(CONFIG_SPL_TEXT_BASE) -s 4 $<
> +
> +INPUTS-$(CONFIG_SPL) += spl/u-boot-spl.mbn
> +
> +spl/u-boot-spl.mbn: spl/u-boot-spl.bin FORCE
> +     $(call if_changed,mksplmbn)
> +
> +ifneq ($(wildcard $(CONFIG_QCOM_TMEL_ELF)),)
> +
> +quiet_cmd_mksplmelf = SPLMELF     $@
> +      cmd_mksplmelf = $(CMD_MKMBN) -o spl/u-boot-spl.melf -m 
> spl/u-boot-spl.mbn,$(CONFIG_QCOM_TMEL_ELF) -s 4 $<

you're including u-boot-spl.mbn twice here no??

> +
> +INPUTS-$(CONFIG_SPL) += spl/u-boot-spl.melf
> +
> +spl/u-boot-spl.melf: spl/u-boot-spl.mbn FORCE
> +     $(call if_changed,mksplmelf)
> +endif        # CONFIG_QCOM_TMEL_ELF
> +
> +endif        # CONFIG_QCOM_GENERATE_MBN
> 

I'll try and get around to revieiwng the rest of this series later in
the week, no need to respin yet.

-- 
// Casey (she/her)

Reply via email to