[U-Boot] [PATCH] dfu: initial implementation

Stefan Schmidt stefan at datenfreihafen.org
Wed Nov 2 20:30:04 CET 2011


Hello.

On Wed, 2011-11-02 at 11:16, Mike Frysinger wrote:
> On Wednesday 02 November 2011 06:00:07 Andrzej Pietrasiewicz wrote:
> 
> are you working with the elinux.org guys ?
> 	http://elinux.org/Merge_DFU_support_into_mainline_U-Boot

That would be me. As I stated in my other mail I was surprised seeing
this patch coming in. I did not communicate my work on this broadly
either. Wanted to show up with soem real code not only promises. Same
as Andrzej it seems. :)

A quick comparison shows me that there are areas that don't touch each
other at all (mmc and images on fat as backend vs. raw nand flash as
backend) and areas that are duplicated and needed to get sorted out.
The DFU protocol implementation in this case. I hope Andrzej is
willing to work toegtehr with me on a final implementation that
contains pieces of both versions. Mine is missing a code split between
DFU protocol and flashing backend for example but feature other parts
missing here.

> >  board/samsung/goni/Makefile |    2 +
> >  board/samsung/goni/flash.c  |  634
> >  board/samsung/goni/flash.h  |   28 ++
> >  board/samsung/goni/goni.c   |   17 +
> >  common/Makefile             |    1 +
> >  common/cmd_dfu.c            |   50 +++
> >  drivers/usb/gadget/Makefile |    1 +
> >  drivers/usb/gadget/dfu.c    |  920
> >  drivers/usb/gadget/dfu.h    |  171
> >  include/configs/s5p_goni.h  |    6 +
> >  include/dfu.h               |   31 ++
> >  include/flash_entity.h      |   39 ++
> >  include/mbr.h               |   49 +++
> 
> this should be split up into at least the dfu core and board-specific changes.  
> although i'd wonder how much of the board/samsung/ stuff is really board 
> specific and couldn't be generalized ...

Agreed. The eMMC flashing with files on FAT is nothing goni specific.
Others should be able to use this as well. I see three different parts
here that can be separated:

1) The DFU protocol implementation which lives in usb gadget with an
interface for flashing backends

2) The flashing backends (no idea where to put them best). At the
moment that would be the implementation here with eMMC and files on
FAT, mine with raw NAND devices and in the future maybe others. Each
flashing backend should be generic enough to allow different boards
using it.

3) Board specific information like partitions or hints for the
flashing backend. The information itself should be in the board file
here and only used by the flashing backends.

How does this sound to you? Andrzej?

regards
Stefan Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 250 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111102/4d516221/attachment.pgp 


More information about the U-Boot mailing list