Traditionally the DFU support is available only as part 2nd stage boot loader(u-boot) and DFU is not supported in SPL.
The SPL-DFU feature is useful for boards which does not have MMC/SD, ethernet boot mechanism to boot the board and only has USB inteface. This patch add DFU support in SPL with RAM memory device support to load and execute u-boot from PC over USB interface. And then leverage full functional feature of DFU in u-boot to flash boot inital binary images to factory or bare-metal boards to memory devices like SPI, eMMC, MMC/SD card using USB interface. As a reference, refer to application note [3] on SPL-DFU support based on 2014.07 u-boot. Steps to build SPL-DFU/RAM: This SPL-DFU support can be enabled through Menuconfig->Boot Images->Enable SPL-DFU support 1) Soc ROMcode loads the u-boot-spl.bin(+DFU) to IRAM from PC host via usb interface and execute DFU. 2) Then load u-boot.img to RAM using dfu-util from PC-host with -R switch to boot u-boot. #sudo dfu-util -c 1 -i 0 -a 0 -D u-boot.img -R Note: On latest mainline u-boot usb fails, need patch [4],[5] to test dfu. Tested on dra7xx SoCs family. [1] is EVM console output with SPL-DFU/RAM enabled. [2] is ubuntu host console output. references: [1] http://pastebin.ubuntu.com/21264490/ [2] http://pastebin.ubuntu.com/21264638/ [3] http://www.ti.com/lit/an/sprac33/sprac33.pdf [4] https://patchwork.ozlabs.org/patch/651146/ [5] http://pastebin.ubuntu.com/21264233/ v3 changes: - minor v2 review comments fixed. - Kconfig SPL/DFU selection made generic. - unselect CONFIG_CMD_BOOTD for SPL v1/v2 changes : - support for DFU RAM device only . - removed support for other SPI flash devices - SPL+DFU loads and execute u-boot and leaverage u-boot dfu functionality to flash binaries to SPI, eMMC etc. - saperated the common dfu code used by SPL and u-boot to common/dfu.c Ravi Babu (5): spl: dfu: add dfu support in SPL common: dfu: saperate the dfu common functionality spl: dfu: adding dfu support functions for SPL-DFU dra7x: boot: add dfu bootmode support dra7x: configs: enable SPL-DFU support Kconfig | 27 ++++++++ arch/arm/cpu/armv7/omap-common/boot-common.c | 5 ++ arch/arm/include/asm/arch-omap5/spl.h | 2 +- cmd/dfu.c | 61 +----------------- common/Makefile | 3 + common/dfu.c | 87 ++++++++++++++++++++++++++ common/spl/Makefile | 1 + common/spl/spl.c | 10 ++- common/spl/spl_dfu.c | 57 +++++++++++++++++ include/configs/dra7xx_evm.h | 20 +++++- include/configs/ti_omap5_common.h | 2 - include/g_dnl.h | 1 + include/spl.h | 8 +++ scripts/Makefile.spl | 4 ++ 14 files changed, 224 insertions(+), 64 deletions(-) create mode 100644 common/dfu.c create mode 100644 common/spl/spl_dfu.c -- 1.7.9.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot