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.

Flash second bootloader to nand through CCS?



Hi,

I want to flash second bootloader to nand flash through CCS4.2. The differ from flashing  first bootloader steps is that I set the offset 0x20000 when I flash the second bootloader. But is dose not boot up. The fail tip is "Error: Bad compare! failed",when I boot the board.Could you told me how to slove it?

 

Can chen

  • Chen,

    Check the NAND ECC algorithm used for flashing? Is it 1-bit Hamming code, or BCH-4,-8,-16-bit?

  • Hi Renjith,

    There are two NAND ECC algorithm as follows:Enter 1 ---> BCH 8 bit, Enter 2 ---> HAM. I try the two method respectively. But the result is the same, tips "Error: Bad compare! failed".

    Should I modify the u-boot code of NAND ECC relatively.

     

    Can

    Thanks

  • Chen,

    It could also be the problem with the ECC layout expected by the first stage u-boot. You can check the layout by looking at the OOB area shown in the output of the "nand dump" command.

  • Hi,

    I Flashing 2nd stage to NAND from 2nd stage in SD boot as discript in DM814x_C6A814x_AM387x_PSP_U-Boot.pdf, the u-boot can boot regularly.The steps as follows:

    TI8148_EVM# mmc init

    TI8148_EVM# mw.b 0x81000000 0xFF 0x20000

    TI8148_EVM$ fatload mmc 1 0x81000000 u-boot.bin

    TI8148_EVM# nandecc hw 0

    TI8148_EVM# nand erase 0x20000 0x60000

    TI8148_EVM# nand write.i 0x81000000 0x20000 0x60000

     But when I flash u-boot.bin through CCS,the boot is error.The steps as follows,

    Choose your operation
    Enter 1 ---> To Flash an Image
    Enter 2 ---> To ERASE the whole NAND
    Enter 3 ---> To EXIT
    1
    Enter image file path
    D:\gchen\psp_dm8148_doc\host_tools\u-boot.bin
    Enter offset (in hex):
    0x20000
    Choose the ECC scheme from given options :
    Enter 1 ---> BCH 8 bit
    Enter 2 ---> HAM 
    Enter 3 ---> T0 EXIT
    Please enter ECC scheme type :
    2

    than Enter, the u-boot.bin can flash into flash. But the boot can tips "Error: Bad compare! faile". I wander that the same u-boot.bin file flash into nand through differents way casuse error tips by CCS tools? It is the problem of  ECC layout?

  • Chen,

    Do "nand dump 0x20000" after flashing from u-boot and from CCS and compare the OOB area layout.