Conversation
Revert the SPL Lemans fixes merged via qualcomm-linux/u-boot PR qualcomm-linux#85 (qualcomm-linux#85). This reverts the following qcom-next commits: 5f0cc1d configs: lemans_spl: Remove TEXT_BASE and REMAKE_ELF configs 530ecc7 arm: dts: lemans-evk: Remove hardcoded memory node bede6f8 misc: qcom-spmi-sdam: Add PHASE_ prefix support Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
…mm-linux#79) Revert the Lemans EVK SPL support merged via qualcomm-linux/u-boot PR qualcomm-linux#79 (qualcomm-linux#79). This reverts the following qcom-next commits: 4c09f12 qcom_lemans_spl: disable SPL_QCOM_BOOT_FROM_PBL for XBL boot 1d68746 mach-snapdragon: spl: add SPL_QCOM_BOOT_FROM_PBL Kconfig option c910816 configs: qcom: Add qcom_lemans_spl_defconfig for Lemans EVK ad30037 arm: dts: qcom: Add Lemans EVK U-Boot DTS overlay for SPL Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
…ualcomm-linux#77) Revert the initial SPL support for Qualcomm Snapdragon SoCs (IPQ5210 and core SPL infrastructure) merged via qualcomm-linux/u-boot PR qualcomm-linux#77 (qualcomm-linux#77). This reverts the following qcom-next commits: 976563d doc: board/qualcomm: Update RDP build instructions 9fa2f27 configs: add qcom_ipq5210_mmc_defconfig 2bd29d6 mach-snapdragon: Add commands to create wrapper ELF 18e16ee mach-snapdragon: spl: Update SMEM with boot details 60b1477 mach-snapdragon: Add initial support for QCOM SPL e3003d1 spl: Include SMEM driver in SPL 3635906 mach-snapdragon: Add PBL shared data defines 16c3f92 misc: qcom_geni: Add minicore support f460d84 pinctrl: qcom: Add ipq5210 pinctrl driver 945097f clk/qcom: add initial clock driver for ipq5210 316563b dts: ipq5210-rdp504-u-boot: add override dtsi 3034e84 binman: qcom: Add type definitions for Qualcomm binaries eb026ca binman: Ignore noload segments for image numbering Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Currently only board/vendor/$(BOARD)/config.mk is supported, add the additional usecase of having a vendor generic config.mk for adding functionality like platform-specific build targets. Additionally, fix the ifdef to correctly check for $(BOARDDIR) rather than $(BOARD) since that's what is actually used in the include path. Reviewed-by: Tom Rini <trini@konsulko.com> Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-1-0c06346e79a9@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This is a fork of qtestsign[1] with modifications to integrate with the
U-Boot build system. It is pulled from
f3df53a5f0e3 ("Rename "fw" to "mbn"")
New Qualcomm dev boards flash U-Boot to the "uefi" partition, the format
is a standard ELF file with custom program headers containing Qualcomm
signatures, hashes and other metadata. Currently this is accomplished
with qtestsign manually, let's instead import it so we can integrate it
into the build process.
This library will be used by a new mkmbn.py tool to create MBN files
which can be directly flashed to the board.
[1]: https://github.com/msm8916-mainline/qtestsign
Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-2-0c06346e79a9@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Adjust the elf class to support creating ELF files from scratch so that mkmbn can build an MBN file from the U-Boot binary image and fix some imports to work correctly in the U-Boot build system. The new tool inspects the DTB embedded in u-boot.bin and uses a lookup table to determine the appropriate configuration based on the root compatible property, effectively encoding the info that was previously kept in documentation. Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-3-0c06346e79a9@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Update the build docs to describe building the u-boot.mbn target explicitly for some boards. Additionally add a new "signing" page to describe the purpose of mkmbn and the MBN format. Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-4-0c06346e79a9@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Add a qualcomm specific Makefile fragment to make u-boot.mbn a build target and introduce a kconfig option to build it by default on relevant platforms via CONFIG_BUILD_TARGET. Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-5-0c06346e79a9@linaro.org [casey: minor kconfig fix] Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
With mkmbn integrated we now no longer need CONFIG_REMAKE_ELF to then run qtestsign and can instead just enable QCOM_GENERATE_MBN to have mkmbn emit an MBN file directly. While we're here, finally rename the db410c and 820c defconfigs to have the qcom_ prefix. Tested on qcs6490 and sm8550. Tested-by: Stephan Gerhold <stephan.gerhold@linaro.org> # db410c Link: https://patch.msgid.link/20260511-b4-qcom-tooling-improvements-v7-6-0c06346e79a9@linaro.org Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Some platforms (e.g. at least Qualcomm) use the ELF format in creative ways, including in the bootrom. Make SPL_REMAKE_ELF use a linker script specified in SPL_REMAKE_ELF_LDSCRIPT (with the previously hardcoded path as the default). Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-1-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Add CONFIG_SPL_OF_LIVE and if set, initialize of_live in spl.c Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-2-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Only Makefile and Kconfig changes necessary. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-3-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Prepare for supporting alternative boot0.h per-SoC by splitting out the existing msm8916-specific code. There is now a selection mechanism to choose a specific boot0.h in the Kconfig. BOOT0_MSM8916_PSCI_WORKAROUND is the only option right now, but more can be added. The toplevel boot0.h additionally enables conditionally performing the include only in u-boot proper, or only in SPL. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-4-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This custom linker script is required to produce a bootable ELF for the sdm845 SoC. An xbl_sec.elf must be provided, which will be put in a section in the ELF as required by the boot rom. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-5-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-6-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Select SUPPORT_SPL so SPL build can be enabled, disable SYSRESET_PSCI in SPL. (SPL runs in EL3, so if SPL itself doesn't provide PSCI, nothing else will.) Also select (SPL_)OF_LIVE and (SPL_)EVENT, which are needed to fix up upstream dt to make usb work, and in general don't make sense to disable in SPL as long as we're not running out of SRAM. Mirror u-boot proper selections like GPIO and pinctrl to ensure consistent behavior, and select SPL_SPRINTF, SPL_LIBCOMMON_SUPPORT etc for similar reasons. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-7-c108ebe8ff4e@seznam.cz [casey: kconfig fix missing "if SPL"] Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
On sdm845, running u-boot SPL in EL3 requires escalting by using an unintentional feature in old builds of xbl_sec.elf. We do this in boot0.h so the rest of U-Boot can stay blissfully unaware of XBL_SEC. If we are already in EL3 for whatever reason, the code is skipped. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-8-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This function is currently only really needed on db410c, move it to the board-specific .c file ahead of introducing board_spl.c to simplify things. If db410c is to ever be converted to not use board-spefific funtions, the generic solution replacing this function should probably not be Qualcomm-specific anyway. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-9-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Code in board.c will now only be compiled into U-Boot proper, and the new board_spl.c will only be built into SPL. Code in mem_map.c is common to both phases since it seems to not cause issues in SPL. The existing dram.c is also common to both phases with similar reasoning. In the future memory map related code should probably behave differenly in SPL, especially if dram initialization is supported. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-10-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
The defconfig should in principle be board-agnostic. Environment simply contains a dfu env specifying where to load u-boot proper (TEXT_BASE - 64). Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-11-c108ebe8ff4e@seznam.cz [casey: add missing default devicetree] Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
The board .dtsi just includes the SoC-specific .dtsi, which adds bootph-all markings to upstream dts nodes which are needed in SPL. Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Link: https://patch.msgid.link/20260521-qcom_spl-v9-12-c108ebe8ff4e@seznam.cz Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
The qcom_geni driver reads an ELF from storage and configures a set of registers and programs the firmware to the GENI Serial Engine (GENI-SE) wrapper device for the expected functionality. Unlike the GENI-SE wrapper found in MSM SoCs, the IPQ5210's GENI-SE wrapper is pre-configured for one of the functions defined in 'enum geni_se_protocol_type'. Hence, the firmware download is not needed. Only the register configuration part is needed. Earlier, the boot stages before U-Boot would configure the GENI-SE (to access UART/SPI etc). Since for IPQ5210 U-Boot SPL, the previous stage (i.e. boot ROM) doesn't do that modify the driver to do the register configuration part alone without reading an ELF from the storage. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
The commit d38787bb5dafa ("mach-snapdragon: Kconfig: changes / additions to
support SPL") auto selects options that may not be applicable to all
platforms. This results in warning messages during make xxx_defconfig
and/or waiting for user input for on/off or values for certain configs.
So auto select options based on the enabled configs in xxx_defconfig.
Fixes: d38787bb5dafa ("mach-snapdragon: Kconfig: changes / additions to support SPL")
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add structure and enum definitions to be able to parse the information that is passed from PBL. This will be used to identify the boot medium. Since the PBL shared data defines are private, move spl_boot_device() from board_spl.c to pbl-shared-data.c to parse the shared data and identify the boot medium Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Update the SMEM with the boot device information got from the boot rom. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add routines to enable U-Boot SPL to be able to proceed with the boot from MMC partitions. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
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 <varadarajan.narayanan@oss.qualcomm.com>
Identify the boot media loader driver and load the FIT image that has the binaries to initialize the DDR, U-Boot proper etc. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
The U-Boot SPL loads the next stage FIT image into internal SRAM. The binaries are 'external' in this FIT image. The SPL has to load the DDR init binary, i.e. qclib and the DDR parameters i.e. qcconfig used by qclib and invoke the qclib. SPL and qclib exchange information using the interface table described in doc/board/qualcomm/interface-table.rst. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add functions that handle loading the FIT image nodes having the Qclib executable and executing it. Also provides 'weak' hooks that can be overridden by SoC specific implementations. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
* Add initial support for the IPQ5210 MMC based RDP platforms. * Define memory layout statically. * Mark the nodes that would be needed for SPL. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add clocks and resets for enabling U-Boot on ipq5210 based RDP platforms. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add pinctrl driver for the TLMM block found in the ipq5210 SoC. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
This patch adds the basic board init routines that invoke the common and mach-snapdragon specific SPL frameworks to proceed with the hand over from boot rom to the next stage i.e. U-Boot proper. This also provides the linker script to generate the SPL image in the format expected by the boot rom. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Introduce a defconfig for the Qualcomm IPQ5210 SoC based RDPs. Presently supports eMMC. Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add details about the SPL & U-Boot proper build steps, converting to flashable images, source URLs for the needed binaries and scripts. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Enable the missing SPL IPQ5210 pinctrl and GENI options. Disable MBN generation, which is unsupported for this platform. Only register the MSM SDHCI tuning callback when MMC tuning is enabled, avoiding an SPL reference to mmc_send_tuning(). Signed-off-by: abhiv <abhiv@qti.qualcomm.com>
Since ipq5424 uses MBN version 7, update the ipq5424 entry in the 'boards' table accordingly. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add a defconfig for running on sm5650 as the first stage bootloader and associated debug config fragment. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
- Add ipq5210 entry to the 'boards' table - Add an argument to specify the SPL load address - ipq5210's boot rom expects the SPL image size to be 4-byte aligned. To support this add an argument to specify the image size alignment to enable the mkmbn script to pad the image accordingly. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add a command line argument to take a list of files to be combined to create a multi-elf expected by the boot rom. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Enable MBN generation for the IPQ5210 MMC SPL build and configure the TMEL ELF input used to create the combined MELF image. Update the mkmbn invocation to use the multi-ELF format and avoid passing a fixed segment size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mkmbntooling and build integration for generating MBN images.