[U-Boot] [PATCH 3/3] dfu: Introduction of the "dfu_checksum_method" env variable for checksum method setting

Tormod Volden
2014-03-31T21:44:19Z

On Mon, Mar 31, 2014 at 10:44 PM, Lukasz Majewski wrote:
> The DFU 1.1 standard in its appendinx B specifies the DFU suffix. It has
> the crc32 for the whole file, vendorID, device ID and other handy
> fields.
>
> Unfortunately, this part of the standard is not supported neither at
> dfu implementation in u-boot nor dfu-util (v.0.5 - debian).
>
> It would be handy for small files (like bootloaders, kernels) where we
> download all the data at once. For critical files it should be
> definitely implemented. From my glimpse observation the dfu-util would
> require some extension to support the DFU suffix (Tormod, please
> correct me if I'm wrong).

You are wrong :) Please don't use what's available in Debian (stable?)
as a reference. I don't know what their maintainer is up to. dfu-util
supports the DFU suffix according to the DFU standard. That means it
checks the CRC after reading the file, and also checks that
vendor/product values match, then sends the firmware to the device
after stripping off the suffix.

Are you wanting to do some CRC checking at the device side? That would
be outside the DFU standard. But you can always put whatever you want
in the "firmware", including proprietary headers or suffices. We
already support some of those, please see the dfu-util (and
dfu-suffx/dfu-prefix) code at dfu-util.gnumonks.org.

Regards,
Tormod