[U-Boot] [ RFC ] fastboot protocol support in u-boot

Stefan Schmidt stefan at datenfreihafen.org
Tue Aug 16 20:12:21 CEST 2011


Hello.

On Tue, 2011-08-16 at 09:32, John Rigby wrote:
> On Tue, Aug 16, 2011 at 8:47 AM, Stefan Schmidt
> <stefan at datenfreihafen.org> wrote:
> >
> > Given these different use cases I never seen fastboot and DFU as
> > competitors. Personally I see DFU as a good and standardized way of
> > _flashing_ devices while fastboot/novacom are way to communicate with
> > the bootloader (allow flashing as on task).
> >
> Just my two cents.  From my discussions with Android developers, they
> use fastboot as a quick turnaround way of getting an image on a board
> during iterative development.

Sure, we did the same with DFU at Openmoko and other companies have
done the same as well with DFU. What I was meaning to point out is
that flashing (be it to NAND, NOR or just to RAM) is only one action
out of many you can do with fastboot. While with DFU it was designed
to only do upgrade or backup operations. Nothing else.

> The other thing I think is important is the ability to choose DFU or
> fastboot at run time vs compile time.  So we should be able to have
> both features turned on in a given u-boot binary.  This means of
> course that fastboot, or DFU would not assume it owned the gadget USB
> HW.

Hmm, interesting point. To be honest I never have thought about people
having both enabled at runtime. Having fastboot with flashing seem to
imply that DFU is not used on that device to me. What is the use-case
you are describing here?

Or are you talking about changing fastboot to use DFU as a flashing
backend or such?

Anyway, DFU does distinguish between run-time and DFU mode. During
run-time it only offers a single DFU class interface descriptor and a
single functional descriptor. This get added to every USB
configuration the devices exposes (and wants to support DFU in it).

This is used to to trigger a switch to the DFU mode where the complete
DFU protocol interaction happens. Normally this is used to enter the
flash mode from the run-time mode via the host utility. Often there is
also a button combination that can be pressed to directly boot up the
device in DFU mode for flashing.

How we could hook that together with fastboot I don't know yet. One
easy solution would be to bring up u-boot in DFU run-time mode and
disable all fastboot stuff once we switch to DFU mode as well as the
other way around.

I'm still curious though if there are practical needs for both
fastboot and DFU enabled.

regards
Stefan Schmidt


More information about the U-Boot mailing list