This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Nand ecc hell in Flash tool, u-boot(arago), linux kernel(arago)

Hello. I use arago-git to build u-boot (2010.06) and linux kernel(2.6.37). I have am3517evm board.

Now work only one flash algorithm:

1.I write x-load and u-boot  with Flash tool (1.5.1.0). I use hardware ecc 1 BCH to do it.

2. Run board. Download linux kernel via tftp uses u-boot. Write linux kernel with software of hardware ecc.

3. Run Linux kernel.

When u-boot try to read data (with software or hardware ecc) that write with Flash tool or Linux kernel, u-boot show much errors.

I need:

1. Download or parts of firmware (x-load, u-boot, linux kernel) uses one utility (for example Flash tool).

2. U-boot can read data that write Linux kernel. It need for firmware update purpose.

I see OOB ECC nand data and I think that realy hell (In all cases I write one data):

kernel
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff fa 05 07 07
07 00 ff 00 07 ff 00 07

u-boot(hw)
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
d3 d3 ff e0 e0 bb 26 d9
69 ed 12 96 ff ff ff ff
ff ff ff ff ff ff ff ff

u-boot(sw)
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
a6 55 97 59 99 ab a6 66
ab 99 96 ab aa aa 97 0c
30 cf 30 f0 ff 69 a9 9b

Flash tool 1.5.1.0 (hw-1 BCH)
ff ff d3 d3 ff e0 e0 bb
26 d9 69 ed 12 96 ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff

Flash tool 1.5.1.0 (hw-4 BCH)
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff 0d 78 37 d0
81 24 05 09 40 5e 0b 51
3d 25 08 a9 e8 7e a7 0d
14 00 8f 40 59 ab dc 2d

Flash tool 1.5.1.0 (hw-8 BCH)
ff ff ff ff ff ff ff ff
ff ff ff ff 17 6f dd 28
90 50 e2 c4 3f 66 63 80
94 df 86 ff a5 fb 74 85
61 62 14 1d d9 85 b8 26
30 ac de b0 7a d1 79 cd
cc f5 08 bb 80 a2 d2 0a
b5 54 e2 b2 54 4f 05 48

Flash tool 1.5.1.0 (sw)
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
a6 55 97 59 99 ab a6 66
ab 99 96 ab aa aa 97 0c
30 cf 30 f0 ff 69 a9 9b

  • Andrei:

    There are some changes in ECC formats used in the 2.6.37 kernel and in the newest U-Boot.

    As I understand it, u-boot now has these options:

    nandecc hw 1     12 bytes ECC data, offsets 40-51

    nandecc hw 2     12 bytes ECC data, offsets 2-13

    nandecc bch4_sw  28 bytes ECC data, offsets 32-63

    nandecc bch8_sw  52 bytes ECC data, offsets 12-63

    nandecc sw    24 bytes ECC data, offsets 40-63

    The reason for the addition of the format using offsets 40-51 is

    for compatibility with JFFS2 which uses offsets 10-17.

    But your nand dump shows kernel using offsets 52-63

    and "hw 1" mode using offsets 48-59.   I will investigate

    what is going on there.

    I am currently working on changes to flash toot that would allow

    you to specify the ECC offset.

    Regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • Andrei,

     

    We have not tried using flashing tools for our releases. We practice flashing the various images from the Uboot. I recommend you follow the Uboot User Guide and try flashing the images:

    http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_04.02.00.07_UserGuide

    (Refer to the 'Flashing from Uboot' - NAND section)

     

    Regards,

    Parth

  • >But your nand dump shows kernel using offsets 52-63 and "hw 1" mode using offsets 48-59. 

    Not only ecc layout does not match in u-boot and linux kernel, but and ecc algorithm. For example we write "Hello" (48 65 6c 6c 6f 0a) and see:

    Linux kernel 2.6.37-arago:

      ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff 04 04 00 00
    00 00 00 00 00 00 00 00

    U-boot 2010.06-arago (hw):

    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    05 05 00 00 00 00 00 00
    00 00 00 00 ff ff ff ff
    ff ff ff ff ff ff ff ff
     

  • >We have not tried using flashing tools for our releases. We practice flashing the various images from the Uboot. 

    U-boot flash target and read data that it write without problem in hardware and software ecc. But I need that u-boot can read data that write Linux kernel (It need for firmware update from Linux).

  • Please say, how I can fix this problem