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.

Why cannot I write UBOOT

I can write uBOOT, UBL by CCS,

I also write a program run in Linux user-space, it can write uImage, but when I write uBoot, UBL, it failed to boot.

my program is somthing like:

 open ( "/dev/mtdblock2", xxx ); //uboot

fopen ( "/root/sff" );

write ( xxxx );

 

And I 've added the header file (2048Bytes) in uboot.

  • The CCS flashing tool adds a header to uBOOT before writing it. You can check the header that is added by the tool and make sure that matches what you added to your own uBOOT image. Also make sure you are flashing it at the correct offset, which can also be found in the CCS flashing code.

    Jeff

  • Yes, I've check the head file : 24 bytes, others set to 0xff

    And the offset I think is also right, in CCS, offset is block2, while in kernel , uboot is start at 512k ( 2block) ( and I also modify the kernel to disable WRITETABLE mask )

     

    My flash is  2048Bytes /page, 128page/block , 1G * 8bit

     

    My linux kernel partion:

    UBOOTENV:  mtdblock0 : 0~256k

    UBL:               mtdblock1: 256~512k

    UBOOT:        mtdblock2: 512~1024k

     

    KERNEL:     mtdblock3: 2M~6M              

  • Heres another way to debug this. In the Linux space, write uBOOT like you are doing. Then in the CCS flashing tool, comment out all of the erase and write calls. When it does a verify, you will see which memory locations do not match up with what the CCS flasher would have written, and that should point to the issue.

    Jeff

  • Thank you jc

    I use ccs to run "NAND_verifyPage"

    I found the data is right , but it failed at ECC

    if ((*hNandInfo->hEccInfo->fxnCorrect)(hNandInfo,&dest[hNandInfo->dataBytesPerOp*i],readECC) != E_PASS)
        {
          return E_FAIL;
        }

     

     

    Does it mean I've turn off ECC at uboot?

  • U-boot stores the ECC in a different format than the boot loader and UBL uses, so you must flash the NAND with the tools provided by TI, not U-boot.

    Jeff