Add defconfig for booting U-Boot in Snagboot mode on Lemans-EVK. In this mode, XBL loads U-Boot directly into DDR and U-Boot enters fastboot over USB for device provisioning.
Create a reusable config fragment at configs/qcom-snagboot.config with common snagboot settings. Platform-specific defconfigs should include this fragment along with their own settings. Signed-off-by: Balaji Selvanathan <[email protected]> --- Changes in v4: - Use CONFIG_ENV_IS_NOWHERE - Place Snagboot related configs in seperate config fragment called configs/qcom-snagboot.config - Include above config fragment in configs/qcom_lemans_snagboot_defconfig 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-snagboot.config | 33 +++++++++++++++++++++++++++++++++ configs/qcom_lemans_snagboot_defconfig | 18 ++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/configs/qcom-snagboot.config b/configs/qcom-snagboot.config new file mode 100644 index 00000000000..d19ad453029 --- /dev/null +++ b/configs/qcom-snagboot.config @@ -0,0 +1,33 @@ +# Common configuration fragment for Qualcomm snagboot mode +# Include this in platform-specific snagboot defconfigs + +CONFIG_QCOM_SNAGBOOT_MODE=y + +# Disable configs that conflict with snagboot mode +# CONFIG_PSCI_RESET is not set +# CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set +# CONFIG_IOMMU is not set +# CONFIG_REBOOT_MODE_ENV_UPDATE is not set + +# Use default environment instead of loading from storage +# This ensures snagboot mode works even with corrupted environment +# CONFIG_ENV_IS_IN_SCSI is not set +# CONFIG_ENV_IS_IN_MMC is not set +# CONFIG_ENV_IS_IN_FLASH is not set +# CONFIG_ENV_IS_IN_NAND is not set +CONFIG_ENV_IS_NOWHERE=y + +# Disable default env file to use CONFIG_BOOTCOMMAND instead +# CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE is not set + +# Auto-enter fastboot mode for snagboot +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fastboot -l $fastboot_addr_r usb 0" +CONFIG_BOOTDELAY=0 + +# Fastboot configuration for partition flashing +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" diff --git a/configs/qcom_lemans_snagboot_defconfig b/configs/qcom_lemans_snagboot_defconfig new file mode 100644 index 00000000000..d6906c1e501 --- /dev/null +++ b/configs/qcom_lemans_snagboot_defconfig @@ -0,0 +1,18 @@ +# 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" +#include "qcom-snagboot.config" + +# Platform-specific settings for Lemans-EVK + +# 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" + +# Timer frequency for Lemans platform +CONFIG_COUNTER_FREQUENCY=19200000 \ No newline at end of file -- 2.34.1

