From: Paresh Bhagat <[email protected]> Introduce a new fragment configuration in u-boot to enable support for the snagfactory tool [1], used for factory flashing of boards. Snagfactory tool first recovers the board via USB DFU (peripheral boot), and then uses fastboot to flash given binaries/images to MMC or other on-board memory via USB. The fragment config can be used to generate boot binaries for board recovery. This fragment config needs to be added additionally, while building a53 images for USB DFU boot.
The fragment config enables configurations to allow flashing via fastboot, manage MMC partitions and boot partitions, customize buffer size and memory usage for fastboot and also integrate OEM commands and UUU compatibility. It sets CONFIG_BOOTCOMMAND to start fastboot mode immediately on startup. It also sets BOOTDELAY to 0 to reduce snagfactory recovery time. Since BOOTCOMMAND and BOOTDELAY configs are being modified, these changes cannot be placed in existing DFU fragment config. Snagfactory used mtd support for flashing both SPI NAND and SPI NOR devices. The fragment config enables mtd in u-boot and also allows SPI flash to be treated as an MTD device. [1]: https://github.com/bootlin/snagboot Signed-off-by: Paresh Bhagat <[email protected]> Signed-off-by: Mahammed Sadik Shaik<[email protected]> --- snagfactory dut log: https://gist.github.com/sadik-smd/85124d0a0a37e739055a6357a42c8310 vi<->v2: Sending the v2 after subscribing to mailing list. --- configs/am6x_a53_snagfactory.config | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 configs/am6x_a53_snagfactory.config diff --git a/configs/am6x_a53_snagfactory.config b/configs/am6x_a53_snagfactory.config new file mode 100644 index 00000000000..ed136407afb --- /dev/null +++ b/configs/am6x_a53_snagfactory.config @@ -0,0 +1,22 @@ +CONFIG_BOOTCOMMAND="fastboot usb 0;" +CONFIG_CMD_FASTBOOT=y +CONFIG_FASTBOOT=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_UUU_SUPPORT=y +CONFIG_FASTBOOT_FLASH_MMC=y +CONFIG_FASTBOOT_OEM_RUN=y +CONFIG_CMD_PART=y +CONFIG_CMD_GPT=y +CONFIG_FASTBOOT_BUF_ADDR=0x82000000 +CONFIG_FASTBOOT_BUF_SIZE=0x7000000 +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_RANDOM_UUID=y +CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_BOOTDELAY=0 +CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc0boot0" +CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc0boot1" +CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y +CONFIG_SPI_FLASH_MTD=y +CONFIG_CMD_MTD=y +CONFIG_CMD_MTDPARTS=y -- 2.34.1

