[PATCH v3 6/6] configs: add qcom_lemans_snagboot_defconfig for Lemans-EVK
Casey Connolly
casey.connolly at linaro.org
Tue Jun 16 15:05:37 CEST 2026
Hi Balaji,
On 16/06/2026 11:22, Balaji Selvanathan wrote:
> Add a defconfig for booting U-Boot in snagboot mode on Lemans-EVK
> development boards. In this mode, XBL loads U-Boot directly and
> U-Boot immediately enters fastboot over USB for partition flashing.
Assuming this would be used on other platforms too, I'd much rather you
put this in a config fragment.
On the topic of adding snagboot documentation, you should include a
section describing board enablement, what config options are required
(e.g. COUNTER_FREQUENCY).
>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
> ---
> Changes in v3:
> - 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
>
> Changes in v2:
> - Newly introduced in v2
> ---
> configs/qcom_lemans_snagboot_defconfig | 45 ++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/configs/qcom_lemans_snagboot_defconfig b/configs/qcom_lemans_snagboot_defconfig
> new file mode 100644
> index 00000000000..c7ac07a6cf3
> --- /dev/null
> +++ b/configs/qcom_lemans_snagboot_defconfig
> @@ -0,0 +1,45 @@
> +# Configuration for building U-Boot for snagboot/recovery mode
> +# on Lemans-EVK dev boards.
> +#
> +# For normal production boot, use qcom_lemans_defconfig instead.
> +
> +#include "qcom_defconfig"
> +
> +# Address where U-Boot will be loaded
> +CONFIG_TEXT_BASE=0x1c100000
> +CONFIG_REMAKE_ELF=y
> +CONFIG_FASTBOOT_BUF_ADDR=0xdb300000
> +CONFIG_DEFAULT_DEVICE_TREE="qcom/lemans-evk"
> +CONFIG_ENV_IS_IN_SCSI=y
> +CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
> +# SCSI partition type GUID for logfs partition
> +CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
> +# CONFIG_ENV_IS_DEFAULT is not set
> +# CONFIG_ENV_IS_NOWHERE is not set
I'd also like to understand why you have ENV_IS_IN_SCSI enabled here, if
I "snag" my board for example by breaking stdin/out/err and saving the
environment so I no longer get a shell and then I go to run snagboot it
would fail in the same way.
For a recovery mechanism it really shouldn't load a potentially broken
or untrusted environment from the board.
> +
> +CONFIG_QCOM_SNAGBOOT_SUPPORT=y
> +
> +CONFIG_FASTBOOT_FLASH_BLOCK=y
> +CONFIG_FASTBOOT_FLASH_BLOCK_INTERFACE_NAME="scsi"
> +CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID=4
> +CONFIG_FASTBOOT_GPT_NAME="gpt"
> +CONFIG_FASTBOOT_MBR_NAME="mbr"
> +
> +# CONFIG_PSCI_RESET is not set
> +
> +CONFIG_COUNTER_FREQUENCY=19200000
> +
> +# CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set
Does this cause problems? Please also disable it in the SNAGBOOT_MODE
kconfig option and explain why it has to be disabled.
> +
> +# CONFIG_IOMMU is not set
> +
> +# CONFIG_REBOOT_MODE_ENV_UPDATE is not set
> +
> +# Disable default env file to use CONFIG_BOOTCOMMAND instead
> +# This allows snagboot-specific bootcmd without modifying shared default.env
> +# CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE is not set
It would be nice if we could use #include on .env files...
> +
> +# Auto-enter fastboot mode for snagboot
> +CONFIG_USE_BOOTCOMMAND=y
> +CONFIG_BOOTCOMMAND="fastboot -l $fastboot_addr_r usb 0"
> +CONFIG_BOOTDELAY=0
I'd suggest putting this in a new configs/qcom-snagboot.config and have
this defconfig include it.
Thanks,
>
--
// Casey (she/her)
More information about the U-Boot
mailing list