Skip to content
Snippets Groups Projects
Commit 3d83e675 authored by Łukasz Majewski's avatar Łukasz Majewski Committed by Marek Vasut
Browse files

dfu: Disable default calculation of CRC32


Patch (SHA1: bd694244)
dfu: Introduction of the "dfu_hash_algo" env variable for checksum method
setting

already introduced more generic handling of the crc32 calculation.
Up till now the CRC32 of received data was calculated unconditionally.
This patch changes this and from now - by default the crc32 is NOT
calculated anymore.

Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
parent e0672b3c
No related branches found
No related tags found
No related merge requests found
...@@ -106,21 +106,15 @@ static char *dfu_get_hash_algo(void) ...@@ -106,21 +106,15 @@ static char *dfu_get_hash_algo(void)
char *s; char *s;
s = getenv("dfu_hash_algo"); s = getenv("dfu_hash_algo");
/* if (!s)
* By default the legacy behaviour to calculate the crc32 hash
* value is preserved.
*
* To disable calculation of the hash algorithm for received data
* specify the "dfu_hash_algo = disabled" at your board envs.
*/
debug("%s: DFU hash method: %s\n", __func__, s ? s : "not specified");
if (!s || !strcmp(s, "crc32"))
return "crc32";
if (!strcmp(s, "disabled"))
return NULL; return NULL;
if (!strcmp(s, "crc32")) {
debug("%s: DFU hash method: %s\n", __func__, s);
return s;
}
error("DFU hash method: %s not supported!\n", s);
return NULL; return NULL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment