[U-Boot] [REGRESSION] commit 3ef46a9 "Fix hash verification" breaks crc32 verify

Marcel Ziswiler marcel at ziswiler.com
Tue May 5 14:32:41 CEST 2015


U-Boot SPL 2015.04-00631-gace97d2 (May 05 2015 - 13:32:44)


U-Boot 2015.04-00631-gace97d2 (May 05 2015 - 13:32:44)

TEGRA30
Model: Toradex Colibri T30
DRAM:  1 GiB
iC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
Colibri T30 # crc32 0x80000000 0x100
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca
Colibri T30 # crc32 -v 0x80000000 0x100 c9a057b3
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != ffffffff ** ERROR **
Colibri T30 # crc32 -v 0x80000000 0x100 9eb4f5ca
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != 301eeead ** ERROR **

WTF is going on?

Git bisection revealed the following:

3ef46a998a2f2c52e227246ac0438ca048ddfd09 is the first bad commit
commit 3ef46a998a2f2c52e227246ac0438ca048ddfd09
Author: Nikolay Dimitrov <picmaster at mail.bg>
Date:   Fri Dec 12 20:01:23 2014 +0200

    Fix hash verification
    
    Fix issue in parse_verify_sum() which swaps handling of env-var and
*address.
    Move hash_command() argc check earlier.
    Cosmetic change on do_hash() variable declaration.
    Improved help message for "hash" command.
    
    Signed-off-by: Nikolay Dimitrov <picmaster at mail.bg>
    Reviewed-by: Simon Glass <sjg at chromium.org>

:040000 040000 631448e48e845fa9a5c33600e02c7f5b8ea886b0
1a75a34d961c61729a10babb9e875ac8e66f03dc M	common

git revert 3ef46a998a2f2c52e227246ac0438ca048ddfd09

Colibri T30 # crc32 0x80000000 0x100
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca
Colibri T30 # crc32 -v 0x80000000 0x100 c9a057b3
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != c9a057b3 ** ERROR **
Colibri T30 # crc32 -v 0x80000000 0x100 9eb4f5ca

Ah, that looks much better!

I will cook up a proper patch shortly...



More information about the U-Boot mailing list