[PATCH v4 1/8] arm: snapdragon: Add CONFIG_QCOM_SNAGBOOT_MODE option
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Fri Jun 19 13:10:24 CEST 2026
Add CONFIG_QCOM_SNAGBOOT_MODE to enable snagboot mode on Qualcomm
platforms. This config automatically selects the required dependencies.
Add QCOM_BOOT0_SNAGBOOT_MODE as boot0.h config for automatic selection
by QCOM_SNAGBOOT_MODE. Document the platform-specific requirements and
configs that must be disabled in snagboot mode.
Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
---
Changes in v4:
- Renamed QCOM_SNAGBOOT_SUPPORT to QCOM_SNAGBOOT_MODE
- Added QCOM_BOOT0_SNAGBOOT_MODE for boot0.h which gets selected by
QCOM_SNAGBOOT_MODE
- Document the platform-specific requirements and configs that must be
disabled in snagboot mode.
Changes in v3:
- Newly introduced in v3
---
arch/arm/mach-snapdragon/Kconfig | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
index 931d25c1023..5c7dbe0dcc4 100644
--- a/arch/arm/mach-snapdragon/Kconfig
+++ b/arch/arm/mach-snapdragon/Kconfig
@@ -65,4 +65,32 @@ config QCOM_EL2_GUNYAH_EXIT_SUPPORT
run properly at EL2.
endchoice
+config QCOM_BOOT0_SNAGBOOT_MODE
+ bool "boot0.h initialization for Snagboot mode"
+ help
+ Enable boot0.h early initialization required when U-Boot
+ is loaded in Snagboot mode by XBL.
+
+config QCOM_SNAGBOOT_MODE
+ bool "Build U-Boot for Snagboot mode loading"
+ select QCOM_BOOT0_SNAGBOOT_MODE
+ select ENABLE_ARM_SOC_BOOT0_HOOK
+ select SKIP_RELOCATE
+ help
+ Build U-Boot to be loaded in Snagboot mode on Qualcomm platforms
+ for device/factory provisioning using fastboot.
+
+ Snagboot mode requires disabling several configs in your defconfig:
+ - PSCI_RESET: Not available in Snagboot mode
+ - IOMMU: Not initialized by XBL in Snagboot mode
+ - SAVE_PREV_BL_INITRAMFS_START_ADDR: Previous bootloader context
+ is not preserved in snagboot mode
+ - REBOOT_MODE_ENV_UPDATE: Not applicable in device/factory provisioning mode
+
+ Additionally, use CONFIG_ENV_IS_NOWHERE to ensure recovery works
+ even with corrupted environment storage.
+
+ Platform-specific requirements:
+ - Set CONFIG_COUNTER_FREQUENCY to match your platform's timer
+ - Configure CONFIG_TEXT_BASE for U-Boot load address
endif
--
2.34.1
More information about the U-Boot
mailing list