public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH v2 0/5] SPL: DFU Support in SPL
@ 2016-07-21 14:53 Ravi Babu
  2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 1/5] spl: dfu: add dfu support " Ravi Babu
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Ravi Babu @ 2016-07-21 14:53 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 27+ messages in thread
[parent not found: <1469193550-19125-1-git-send-email-ravibabu@ti.com>]

end of thread, other threads:[~2016-07-28 13:22 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21 14:53 [U-Boot] [RFC PATCH v2 0/5] SPL: DFU Support in SPL Ravi Babu
2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 1/5] spl: dfu: add dfu support " Ravi Babu
2016-07-22 13:41   ` Tom Rini
2016-07-27 14:04     ` B, Ravi
2016-07-27 15:25       ` Tom Rini
2016-07-28  4:09         ` B, Ravi
2016-07-28 13:22           ` Tom Rini
2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 2/5] common: dfu: saperate the dfu common functionality Ravi Babu
2016-07-22 13:41   ` Tom Rini
2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 3/5] spl: dfu: adding dfu support functions for SPL-DFU Ravi Babu
2016-07-22 13:41   ` Tom Rini
2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 4/5] dra7x: boot: add dfu bootmode support Ravi Babu
2016-07-22 13:41   ` Tom Rini
2016-07-25 14:17     ` B, Ravi
2016-07-25 14:38       ` Tom Rini
2016-07-25 14:53         ` B, Ravi
2016-07-21 14:53 ` [U-Boot] [RFC PATCH v2 5/5] dra7x: configs: enable SPL-DFU support Ravi Babu
2016-07-22 13:42   ` Tom Rini
2016-07-22 13:42 ` [U-Boot] [RFC PATCH v2 0/5] SPL: DFU Support in SPL Tom Rini
2016-07-25 14:40   ` B, Ravi
2016-07-25 14:58     ` Tom Rini
2016-07-25 15:25       ` B, Ravi
2016-07-25 15:34         ` Tom Rini
2016-07-25 15:41           ` B, Ravi
     [not found] <1469193550-19125-1-git-send-email-ravibabu@ti.com>
     [not found] ` <1469193550-19125-4-git-send-email-ravibabu@ti.com>
2016-07-25 10:05   ` [U-Boot] [RFC PATCH v2 3/5] spl: dfu: adding dfu support functions for SPL-DFU Lukasz Majewski
2016-07-25 13:08     ` B, Ravi
2016-07-25 14:16       ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox