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.

question about burning kernel to c6678's nand flash

hi,all:

  We desinged a board based on evm6678, change the nand from 512Mb to 1Gb.

  I can burn the linux kernel and its file system to nand flash under CCS and

the board can boot from nand successfully. But the time of programming nand under

CCS is a little long. I managed to program the nand when the linux is running on the board

like this:

flash_eraseall /dev/mtd2

nandwrite -p /dev/mtd2 kernel.bin

  This method works for my board for the beginning several months. Several day ago, I found

this method can't work. I change the programming back to burn the kernel under CCS, the kernel

can still be burned successfully.

  I compared the contents of the /dev/mtd2 after the 2 programming process (under linux and CCS) 

like this:

hexdump /dev/mtd2 > kernelContent.bin

the two image is totally the same.

  So why can't 6678 boot from nand after programming under linux? Please give some advice. Thanks!

 

  • Hi Murat,

    Could you make hexdump /dev/mtd2 after flash_eraseall /dev/mtd2 to see if whole nand is erased well.

    BR
    Ivan
  • Hi, Ivan:
    Now I don't have the board at hand, I will check it later.
    I note one thing: When I hexdump the mtd2 after programming, the content of the dump is the same as the fine one
    (the one programmed by CCS).
  • hi, Ivan:

    I have dumped the nand's content, they are all FF, here is the file content:

    0000000 ffff ffff ffff ffff ffff ffff ffff ffff
    *
    1000000

    So I think the erase is OK, any other suggestion?

     

  • Hi Murat,

    I post you a very useful link for NAND manipulation. From the link you will see that: "Each page of a NAND flash has an “out of band” (OOB) area to hold Error Correcting Code (ECC) and other metadata, usually 16 bytes of OOB for every 512 bytes of page data." Also in "14.2 Erasing, Reading, Writing to NAND Flash" see the NOTE. I'm not sure if this is your case, but I think that ECC corrections or some bad block is many probably. Please read the link and try with options for ecc/oob.
    openocd.org/.../NAND-Flash-Commands.html

    BR
    Ivan
  • Hi Murat,


    CCS is a little long. I managed to program the nand when the linux is running on the board

    like this:

    flash_eraseall /dev/mtd2

    nandwrite -p /dev/mtd2 kernel.bin

    This method works for my board for the beginning several months. Several day ago, I found

    this method can't work. I change the programming back to burn the kernel under CCS, the kernel

    can still be burned successfully.


    You said that the same procedure worked earlier but not now Right ?
    How ? did you change anything ?
    Like ECC, NAND width etc ., ?
    You have to remember what you did earlier ?
    Do you have a EVM board with you ?
    And you can try with pre-built kernel image.
  • hi, Ivan and Stalin:

      Thanks for your reply.

      I check the ecc option, found that when I add -n option, the programming will be OK.

      Thanks for your kind reply!