[U-Boot-Users] iminfo - Bad Header Checksum

Dale Dunlea daledunlea at commergy.com
Mon May 30 12:20:50 CEST 2005


>Please don't describe what  you  did,  but  instead  post  the  EXACT
>commands you used.
>
>  
>
Once more with feeling then: In the following, test.img is the uImage of 
the Linux kernel as created by "make uImage"

U-Boot 1.0.1(eval-20040206-0-pre4) (Jun 18 2004 - 20:17:00)

Motorola PowerPC ProcessorID=00000000 Rev. PVR=80200020
Board: Motorola MPC8540ADS Board
    CPU: 660 MHz
    CCB: 264 MHz
    DDR: 132 MHz
    LBC: 66 MHz
L1 D-cache 32KB, L1 I-cache 32KB enabled.
I2C:   ready
DRAM:  DDR module detected, total size:256MB.
256 MB
FLASH:  8 MB
L2 cache enabled: 256KB
In:    serial
Out:   serial
Err:   serial
Net:   MOTO ETHERNET
Hit any key to stop autoboot:  3 

Metrowerks=> setenv serverip 10.82.190.3

Metrowerks=> tftpboot 0 test.img

Enet starting in Full Duplex
Enet starting in 1000BT
TFTP from server 10.82.190.3; our IP address is 10.82.190.238
Filename 'test.img'.
Load address: 0x0
Loading: *packetHandler changed.
#################################################################
     #################################################################
done
Bytes transferred = 662475 (a1bcb hex)

// Image has been transferred over TFTP.

Metrowerks=> imi

## Checking Image at 00000000 ...
   Bad Header Checksum

// Image passes magic number, but fails header checksum

Metrowerks=> md 0
00000000: 27051956 32cf8de9 429679c4 000a1b8b    '..V2...B.y.....
00000010: 00000000 00000000 fbc58b91 05070201    ................
00000020: 4c696e75 782d322e 342e3235 00000000    Linux-2.4.25....
00000030: 00000000 00000000 00000000 00000000    ................
00000040: 1f8b0808 c4799642 0203766d 6c696e75    .....y.B..vmlinu
00000050: 7800e45a 7b705455 9aff6e3f 4847b2da    x..Z{pTU..n?HG..
00000060: 03371848 0889526e 82198c2b d4deee0e    .7.H..Rn...+....
00000070: cd0d32b5 8d61a65a 2aa133cc ba760cd6    ..2..a.Z*.3..v..
00000080: 90c1a965 30ccded1 db7d6f27 714a843f    ...e0....}o'qJ.?
00000090: 3ae96417 356ae3a3 4b468b8d 33503ef0    :.d.5j..KF..3P>.
000000a0: 7179e8ca e254b53a e06311c3 80250833    qy...T.:.c...%.3
000000b0: 1305c6f0 cadddf77 bb034978 84dd2a2d    .......w..Ix..*-
000000c0: 7793aad4 bde73be7 7ce77bfc bec7b949    w.....;.|.{....I
000000d0: 9888c2d9 5f552b54 d4c7af57 d4d76e54    ...._U+T...W..nT
000000e0: d4bdb728 ea699fe2 033d40a5 0d2a510a    ...(.i...=@..*Q.
000000f0: 6b2ad542 7baa8a0c ac2fe953 a7d8530b    k*.B{..../.S..S.

// Magic number 27051956 can be seen, and checksum of 32cf8de9 is 
located at offset 4

Metrowerks=> mw 4 0
Metrowerks=> crc32 0 40
CRC32 for 00000000 ... 0000003f ==> 32cf8de9

// Checksum returned by above command matches the checksum that had been 
stored.

Metrowerks=> cp ff800000 0 100000
// Copy pre-existing kernel image from flash
Metrowerks=> imi 0

## Checking Image at 00000000 ...
   Image Name:   Linux-2.4.25-mpc8540eval-20040322
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    921746 Bytes = 900.1 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

// This image verifies ok - examine header structure

Metrowerks=> md 0
00000000: 27051956 2ae32b83 40d31f5f 000e1092    '..V*.+. at .._....
00000010: 00000000 00000000 4f26d374 05070201    ........O&.t....
00000020: 4c696e75 782d322e 342e3235 2d6d7063    Linux-2.4.25-mpc
00000030: 38353430 6576616c 2d323030 34303332    8540eval-2004032
00000040: 32000000 00000000 00000000 1f8b0808    2...............
00000050: 5e1fd340 0203766d 6c696e75 7800d45a    ^.. at ..vmlinux..Z
00000060: 7b741455 9affaad3 0d792995 a2814042    {t.U.....y)... at B
00000070: a8c48809 844ca361 a8ee8450 019c2948    .....L.a...P..)H
00000080: 764e1313 8880330d 09ca233b 1b21ccd6    vN....3...#;.!..
00000090: e0edaaea a49c05e4 9ced24cd 1c0ea006    ..........$.....
000000a0: 85121975 5189c328 380dcb22 cacc1e60    ...uQ..(8.."...`
000000b0: 80519ce3 468505c4 3d071086 4c107bbf    .Q..F...=...L.{.
000000c0: af3b0d51 303acf03 7fdcf3fb eefb77bf    .;.Q0:........w.
000000d0: d7bdd589 0f00989e a1b2a7ee 52d9aed1    ............R...
000000e0: 2afbc37d 2abb52ac 1663bb02 e060fb6d    *..}*.R..c...`.m
000000f0: 16eb04ab eac4ff7c c1ce255b 55a78c2c    .......|..%[U..,
Metrowerks=> mw 4 0
Metrowerks=> crc32 0 40
CRC32 for 00000000 ... 0000003f ==> e28791ee

// Recalculated CRC doesn't match old working CRC

Metrowerks=> mw 4 e28791ee
Metrowerks=> md 0
00000000: 27051956 e28791ee 40d31f5f 000e1092    '..V.... at .._....
00000010: 00000000 00000000 4f26d374 05070201    ........O&.t....
00000020: 4c696e75 782d322e 342e3235 2d6d7063    Linux-2.4.25-mpc
00000030: 38353430 6576616c 2d323030 34303332    8540eval-2004032
00000040: 32000000 00000000 00000000 1f8b0808    2...............
00000050: 5e1fd340 0203766d 6c696e75 7800d45a    ^.. at ..vmlinux..Z
00000060: 7b741455 9affaad3 0d792995 a2814042    {t.U.....y)... at B
00000070: a8c48809 844ca361 a8ee8450 019c2948    .....L.a...P..)H
00000080: 764e1313 8880330d 09ca233b 1b21ccd6    vN....3...#;.!..
00000090: e0edaaea a49c05e4 9ced24cd 1c0ea006    ..........$.....
000000a0: 85121975 5189c328 380dcb22 cacc1e60    ...uQ..(8.."...`
000000b0: 80519ce3 468505c4 3d071086 4c107bbf    .Q..F...=...L.{.
000000c0: af3b0d51 303acf03 7fdcf3fb eefb77bf    .;.Q0:........w.
000000d0: d7bdd589 0f00989e a1b2a7ee 52d9aed1    ............R...
000000e0: 2afbc37d 2abb52ac 1663bb02 e060fb6d    *..}*.R..c...`.m
000000f0: 16eb04ab eac4ff7c c1ce255b 55a78c2c    .......|..%[U..,
Metrowerks=> imi

## Checking Image at 00000000 ...
   Bad Header Checksum

// Recalculated checksum differs


I hope this clarifies matters.

Regards,
Dale Dunlea




More information about the U-Boot mailing list