[PATCH v3 0/6] arm: snapdragon: Add snagboot support for Lemans-EVK
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Thu Jun 18 12:41:00 CEST 2026
Hi Casey,
On 6/16/2026 5:56 PM, Casey Connolly wrote:
> Hi Balaji,
>
> On 16/06/2026 11:22, Balaji Selvanathan wrote:
>> This series adds support for running U-Boot in snagboot mode on
>> Qualcomm Snapdragon platforms, targeting the Lemans-EVK board.
> You didn't respond to my reply on v2 of this series.
Sorry, missed replying to you regarding v3 series.
>> Snagboot is an open-source, scriptable flashing framework that provides
>> an alternative to the proprietary Firehose protocol for device
>> provisioning. Like the traditional EDL+Firehose flow, Snagboot uses the
>> Qualcomm boot ROM recovery mode (EDL) and Sahara protocol to download
>> and execute bootloaders. However, instead of using the proprietary
>> Firehose programmer, Snagboot loads U-Boot into DDR and uses the
>> standard fastboot protocol for device flashing.
> Glad to have some more info here. Please also add a doc page with this
> information as well as a list of supported platforms.
Sure, will include a patch having documentation in v4 respin.
>
> I would hope that this support will be expanded to other platforms, and
> I'll make that assumption with my feedback.
Yes, currently we are supporting for Lemans EVK. The plan is to to
support other platforms in future.
>
>> The framework consists of three modular components: snagrecover
>> (downloads XBL/QCLib to initialize DDR and load U-Boot into RAM),
>> snagflash (communicates with U-Boot over USB using fastboot to flash
>> system images), and snagfactory (orchestrates parallel factory
>> flashing tasks).
>>
>> In the snagboot execution flow, ROM code in recovery mode loads
> recovery mode?? Please be consistent and just say EDL or boot ROM.
Sure.
Thanks,
Balaji
>
>> snagrecover, which downloads XBL to internal memory. XBL executes
>> and initializes DDR, then snagrecover downloads U-Boot into DDR and
>> transfers control to it. At this point, XBL has left the MMU enabled
>> with its own page tables and has not initialized PSCI firmware or
>> populated the Command DB. U-Boot must handle this non-standard boot
>> environment to enter fastboot mode for device flashing.
>>
>> This series addresses the specific requirements of the snagboot flow:
>>
>> Patch 1 changes SYSRESET_PSCI from 'select' to 'imply' so it can
>> be disabled on platforms where PSCI firmware is unavailable.
>>
>> Patch 2 guards show_psci_version() and qcom_psci_fixup() with
>> CONFIG_ARM_SMCCC to prevent build failures when SMCCC is disabled.
>>
>> Patch 3 adds CONFIG_QCOM_SNAGBOOT_SUPPORT option to enable snagboot
>> mode support on Qualcomm platforms.
>>
>> Patch 4 disables the MMU and invalidates TLBs at the earliest entry
>> point to clear stale page tables left by previous bootloader
>> before U-Boot sets up its own MMU.
>>
>> Patch 5 adds QCOM_COMMAND_DB_OPTIONAL to allow the CMD DB driver to
>> bind successfully when CMD DB data is not populated by XBL, logging
>> a warning instead of failing.
>>
>> Patch 6 adds qcom_lemans_snagboot_defconfig for Lemans-EVK, based
>> on qcom_defconfig with snagboot-specific settings.
>>
>> Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
>> ---
>> Changes in v3:
>> - Brought the MMU disable logic under CONFIG_QCOM_SNAGBOOT_SUPPORT
>> ifdef condition
>> - Moved the MMU disable codes to a new seperate file
>> - Used "if (IS_ENABLED(CONFIG_QCOM_COMMAND_DB_OPTIONAL))" instead
>> of #ifdef
>> - Removed enabling QCOM_COMMAND_DB_OPTIONAL, ENABLE_ARM_SOC_BOOT0_HOOK
>> and SKIP_RELOCATE as they are now automatically enabled by
>> QCOM_SNAGBOOT_SUPPORT selection
>> - Removed updating MAINTAINERS as the defconfig file is picked up by
>> the "N: qcom" line
>> - Link to v2: https://lore.kernel.org/u-boot/20260608-snagboot-v2-0-036bb0343bf7@oss.qualcomm.com/
>>
>> Changes in v2:
>> - Changed SYSRESET_PSCI from 'select' to 'imply'
>> - Guard show_psci_version() and qcom_psci_fixup() with CONFIG_ARM_SMCCC
>> - Disables the MMU and invalidates TLBs at the earliest entry point
>> - Add qcom_lemans_snagboot_defconfig for Lemans-EVK
>> - Link to v1: https://lore.kernel.org/u-boot/20260409-cmddb-v1-1-b10549b34133@oss.qualcomm.com/
>>
>> ---
>> Balaji Selvanathan (6):
>> arm: snapdragon: Make SYSRESET_PSCI optional
>> arm: snapdragon: Guard PSCI functions with CONFIG_ARM_SMCCC
>> arm: snapdragon: Add CONFIG_QCOM_SNAGBOOT_SUPPORT option
>> arm: snapdragon: Disable MMU early before U-Boot reset vector
>> soc: qcom: cmd-db: Allow boot without CMD DB data
>> configs: add qcom_lemans_snagboot_defconfig for Lemans-EVK
>>
>> arch/arm/Kconfig | 2 +-
>> arch/arm/mach-snapdragon/Kconfig | 13 ++++++
>> arch/arm/mach-snapdragon/board.c | 6 +++
>> arch/arm/mach-snapdragon/include/mach/boot0.h | 2 +
>> .../mach-snapdragon/include/mach/snagboot_boot0.h | 53 ++++++++++++++++++++++
>> configs/qcom_lemans_snagboot_defconfig | 45 ++++++++++++++++++
>> drivers/soc/qcom/Kconfig | 18 ++++++++
>> drivers/soc/qcom/cmd-db.c | 14 +++++-
>> 8 files changed, 150 insertions(+), 3 deletions(-)
>> ---
>> base-commit: e1c3db1f788ed8106840e81b795e030cbe0020b7
>> change-id: 20260616-sngboot-760714938d18
>>
>> Best regards,
More information about the U-Boot
mailing list