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.
u-boot-spl.melf is the combined multi-elf file that has u-boot-spl.mbn followed by the TME executable. 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 + 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 $< + +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 -- 2.34.1
