[U-Boot] [RFC PATCH v2 0/5] SPL: DFU Support in SPL

Ravi Babu ravibabu at ti.com
Thu Jul 21 16:53:12 CEST 2016


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 u-boot usb fails, need patch [4] 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/20312940/
[2] http://pastebin.ubuntu.com/20313150/
[3] http://www.ti.com/lit/an/sprac33/sprac33.pdf
[4] https://patchwork.ozlabs.org/patch/651146/

v1 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/command.c                             |    2 +-
 common/dfu.c                                 |   88 ++++++++++++++++++++++++++
 common/spl/Makefile                          |    1 +
 common/spl/spl.c                             |   10 ++-
 common/spl/spl_dfu.c                         |   57 +++++++++++++++++
 include/configs/dra7xx_evm.h                 |   19 +++++-
 include/configs/ti_omap5_common.h            |    2 -
 include/g_dnl.h                              |    1 +
 include/spl.h                                |    8 +++
 scripts/Makefile.spl                         |    4 ++
 15 files changed, 225 insertions(+), 65 deletions(-)
 create mode 100644 common/dfu.c
 create mode 100644 common/spl/spl_dfu.c

-- 
1.7.9.5



More information about the U-Boot mailing list