Part Number:OMAP-L138
Tool/software: Linux
I have to update (write) a new Linux kernel into NAND-Flash partition from a running Linux system.
To write into partition 2 of NAND-Flash I use the program "nandwrite" with option "-p":
nandwrite /dev/mtd -p <Image>
But after that my board does not start up; the bootloader "u-boot" the bootloader complains about CRC error loading the kernel.
I'm using the "4 Bit HW ECC correction" for the NAND-Flash in the bootloader and in the Linux kernel.
For bootloader "u-boot" there are defined:
#undef CONFIG_SYS_NAND_HW_ECC
#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
#define CONFIG_SYS_NAND_USE_FLASH_BBT
For Linux kernel (in board specific file) there are defined:
static struct davinci_aemif_timing gins_qmonixx_nand_timing = {
// All timings in nanoseconds
.wsetup = 10,
.wstrobe = 20,
.whold = 0,
.rsetup = 10,
.rstrobe = 20,
.rhold = 20, // For reliable 16-bit NAND operations R_HOLD must be set to 1 to ensure 2 clock cycles for ECC calculation
.ta = 60,
};
static struct davinci_nand_pdata gins_qmonixx_nand_pdata = {
.parts = gins_qmonixx_nand_parts,
.nr_parts = ARRAY_SIZE(gins_qmonixx_nand_parts),
.options = NAND_BUSWIDTH_16,
.timing = &gins_qmonixx_nand_timing,
// Configuration for ECC
// See also configuration for U-Boot: CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST, CONFIG_SYS_NAND_USE_FLASH_BBT
.ecc_mode = NAND_ECC_HW, // do not use NAND_ECC_HW_OOB_FIRST here!
.ecc_bits = 4,
.bbt_options = NAND_BBT_USE_FLASH,
};
What could be the problem?
Remark:
If I write the Linux kernel with help of the bootloader "u-boot" into the NAND flash, then the system is started successfully!
Thanks for your help in advance!
Jan-Marc.