From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] dfu: Introduction of the "dfu_checksum_method" env variable for checksum method setting
Date: Mon, 31 Mar 2014 17:04:38 -0400 [thread overview]
Message-ID: <5339D866.8020405@ti.com> (raw)
In-Reply-To: <20140331224402.15e3e161@jawa>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/31/2014 04:44 PM, Lukasz Majewski wrote:
> On Mon, 31 Mar 2014 14:05:17 -0400
> Tom Rini <trini@ti.com> wrote:
>
>> On Mon, Mar 31, 2014 at 10:48:49AM +0200, Lukasz Majewski wrote:
>>
>>> Up till now the CRC32 of received data was calculated
>>> unconditionally. The standard crc32 implementation causes long
>>> delays when large images were uploaded.
>>>
>>> The "dfu_checksum_method" environment variable gives the
>>> opportunity to enable on demand (when e.g. debugging) the crc32
>>> calculation. It can be done without need to recompile the u-boot
>>> binary.
>>>
>>> By default the crc32 is not calculated.
>>>
>>> Tests results:
>>> 400 MiB ums.img file
>>> With crc32 calculation: 65 sec [avg 6.29 MB/s]
>>> Without crc32 calculation: 25 sec [avg 16.17 MB/s]
>>>
>>> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
>>
>> OK, so, protocol question.
>
> 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).
OK, so this is the important part. We're doing a crc32 on stuff that's
not required by spec, just handy for verification, manually.
[snip]
> When we use CRC in such a way, we should be able to decide which tool
> (algorithm) use for debug. SHA1, MD5, etc are widely available on each
> linux box. To have the same crc32 algorithm, which is in u-boot,
> implemented as linux command line tool you need to search a bit
> (libarchive-zip-perl package for debian).
I take your point, but I use rhash -C to get matching crc32 and it was
the first thing I stumbled upon when going "oh right, what does crc32?".
[snip]
> TO SUM UP:
>
> 1. Handling of the DFU suffix shall be implemented and utilized in both
> u-boot and dfu-util with critical files (bootloaders, kernel).
>
> 2. There should be freedom to use different checksum algorithms for
> providing debugging information.
>
> 3. The current CRC32 calculation at DFU should be optimized.
Well, is there work being done on the dfu-util side currently or planned
in the near future to do #1 per the spec?
But, with that, I'm happier to default to no crc32'ing the data for today.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTOdhmAAoJENk4IS6UOR1WDsYP/2eg3v+K5nCUZ22eYnrY4s14
f8KUan8My7Ifr/to9qbAIFsSuw5mlLPvYy5JNnrbmmipDH2bQIO20R1t94/Mm8Ut
Hoj1nbGZ3JvMsoj86D+9pFz2AchVgbpvs+boiJGw2s1TZ3xKoNlJ1O4WJ8ttZRZS
1B3FC50PKYJK6lgWgfvds2AevLIAcF1QyePVsOLVKV2USilFiZ1LVb8qUFp5l6Ja
LX3wfQjhPq4gQq8bX7LW6zNbDkXuZjxLlKT/kUxzl2qclpHj4+8rXVVRf1mLaLvU
Dvx50V/JCncIivRBhfvK2BoQ/LOntmPwGfO95AY57naP9+nCzzE9vdKv/Ki5vpju
/q/CjlXbkS4iwru+91neyMdfeCiiALV2yW0GBORgph7kCpUk343S753epl/MFmAW
rOQ0xBjw4q5KeXijtQG5bdevynPkB09soKKhQX5XRe7i8olXe32+khQVwqpomjkG
v0YbKvUTuCZ1NNZqEey/zO4gJPR2Tq4QiNFpfFPvcYOqlqoC/C84HfO+M8ocKiUh
SUgdaUQI+uP7LSQ7Yv5N149ZD4aWAfsyU5YCtyC0gI9aXRF5YqwWU96eym8PUVM8
amo+srsp1uK5l6XRO0cqtM9cmLedPRNAEKhah4/GgZa3S6lTH3oD7JBEPNyazTsc
FpOnIzGk5JJnVpeobQv2
=HfXm
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2014-03-31 21:04 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 8:48 [U-Boot] [PATCH 0/3] dfu: Several enhancements for dfu subsystem Lukasz Majewski
2014-03-31 8:48 ` [U-Boot] [PATCH 1/3] dfu: mmc: Provide support for eMMC boot partition access Lukasz Majewski
2014-03-31 8:59 ` Marek Vasut
2014-03-31 9:14 ` Lukasz Majewski
2014-05-09 14:58 ` [U-Boot] [PATCH v2] " Lukasz Majewski
2014-05-14 22:24 ` Marek Vasut
2014-03-31 8:48 ` [U-Boot] [PATCH 2/3] dfu: add static alt num count in dfu_config_entities() Lukasz Majewski
2014-03-31 9:01 ` Marek Vasut
2014-03-31 9:15 ` Lukasz Majewski
2014-04-01 6:47 ` Przemyslaw Marczak
2014-04-01 6:49 ` Marek Vasut
2014-04-01 7:45 ` Lukasz Majewski
2014-03-31 8:48 ` [U-Boot] [PATCH 3/3] dfu: Introduction of the "dfu_checksum_method" env variable for checksum method setting Lukasz Majewski
2014-03-31 9:04 ` Marek Vasut
2014-03-31 9:24 ` Lukasz Majewski
2014-03-31 9:29 ` Marek Vasut
2014-03-31 9:49 ` Lukasz Majewski
2014-03-31 11:19 ` Pantelis Antoniou
2014-03-31 12:04 ` Lukasz Majewski
2014-03-31 12:10 ` Pantelis Antoniou
2014-03-31 12:16 ` Pantelis Antoniou
2014-03-31 18:05 ` Tom Rini
2014-03-31 18:15 ` Marek Vasut
2014-03-31 18:26 ` Tom Rini
2014-03-31 20:44 ` Lukasz Majewski
2014-03-31 21:04 ` Tom Rini [this message]
2014-04-01 9:05 ` Lukasz Majewski
2014-03-31 21:44 ` Tormod Volden
2014-04-01 9:00 ` Lukasz Majewski
2014-04-01 9:15 ` Stefan Schmidt
2014-04-01 11:31 ` Lukasz Majewski
2014-05-05 13:16 ` [U-Boot] [PATCH v2] " Lukasz Majewski
2014-05-05 17:47 ` Marek Vasut
2014-05-08 12:27 ` [U-Boot] [PATCH v3] dfu: Introduction of the "dfu_hash_algo" " Lukasz Majewski
2014-05-08 13:07 ` Marek Vasut
2014-05-09 4:27 ` Wolfgang Denk
2014-05-09 6:52 ` Lukasz Majewski
2014-05-09 8:31 ` Wolfgang Denk
2014-05-09 9:54 ` Lukasz Majewski
2014-05-12 14:45 ` Tom Rini
2014-05-15 7:09 ` Lukasz Majewski
2014-05-15 9:27 ` Heiko Schocher
2014-05-15 11:19 ` Wolfgang Denk
2014-05-15 13:43 ` Lukasz Majewski
2014-05-15 14:07 ` Wolfgang Denk
2014-05-16 6:08 ` Lukasz Majewski
2014-05-16 8:58 ` Lukasz Majewski
2014-05-19 14:02 ` Heiko Schocher
2014-05-20 17:22 ` Lukasz Majewski
2014-05-22 9:46 ` Lukasz Majewski
2014-05-12 8:43 ` [U-Boot] [PATCH v4] " Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5339D866.8020405@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.