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 boot problem

Hi,

in my custom board i using TOSHIBA TC58NVG1S3ETA00 2GB NAND flash.

i sucessfully flashing the MLO and u-boot.img to the NAND flash with the help from following link:

http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User's_Guide

for flashing kernel image and file system, i follow the instruction and command from the link above. After i reset my board, it can boot into u-boot, when booting the kernel image, it come out the error message:

Error: Bad compare! failed

Error: Bad compare! failed

Error: Bad compare! failed ......

My u-boot nand boot config ("u-boot-04.06.00.02/include/configs/am335x_evm.h) is as bellow:

#define CONFIG_SPL_NAND_SIMPLE

#define CONFIG_SPL_NAND_SUPPORT

#define CONFIG_SYS_NAND_5_ADDR_CYCLE

#define CONFIG_SYS_NAND_PAGE_SIZE 2048

#define CONFIG_SYS_NAND_OOBSIZE  64

#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)

#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS #define CONFIG_SYS_NAND_ECCPOS  { 2, 3, 4, 5, 6, 7, 8, 9, \      

                                                                                                                                                                                                 10, 11, 12, 13, 14, 15, 16, 17, \      

                                                                                                                                                                                                 18, 19, 20, 21, 22, 23, 24, 25, \      

                                                                                                                                                                                                 26, 27, 28, 29, 30, 31, 32, 33, \      

                                                                                                                                                                                                 34, 35, 36, 37, 38, 39, 40, 41, \      

                                                                                                                                                                                                 42, 43, 44, 45, 46, 47, 48, 49, \      

                                                                                                                                                                                                  50, 51, 52, 53, 54, 55, 56, 57, }

#define CONFIG_SYS_NAND_ECCSIZE  512

#define CONFIG_SYS_NAND_ECCBYTES 14

#define CONFIG_SYS_NAND_ECCSTEPS 4

#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \       CONFIG_SYS_NAND_ECCSTEPS)

#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \       CONFIG_SYS_NAND_PAGE_SIZE)

#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE

#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000

i have changed the NAND_PAGE_SIZE base on the nand flash i'm using, but i dont found any ECC infomation from the nand flash datasheet.

Is this error cause by ECC setting not correct ? 

What is causing the way of u-boot flashing the kernel image and file system not correct ?

Thanks and Regards

Keldy