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.

RBL and multiple u-boot.min.nand copy

Hi All,

"The RBL does not do any form of bad block checking/management. It will simply rely on using the HW ECCs generated during the page reads to verify that a page read was correct. This means that the HW ECC values generated during the reads of each 512 bytes of data will be compared against the ECC values that are stored in the spare bytes of the NAND page. If the RBL sees an ECC mismatch occur during a page read, it will abort the operation from that block and try the next block. It will do this up to block 5 of the NAND device, strting from block 1 (skipping over block 0). If there is an ECC mismatch, the RBL will NOT use the ECC values to do bit error correction, even though the mismatched values could be used to find and correct a single-bit error." source: processors.wiki.ti.com/.../RBL_UBL_and_host_program

The above desc. stats that I can write upto 5 u-boot.min to 5 different blocks of NAND and if any of the blocks is  having ECC issue, RBL will jump to next block for valid u-boot.min.

I got this point and I understand it, now how can I write 5 uboot.min to 5 different block of NAND using bootscript? because in boot script I can write the complete partition. 

Another question is how RBL counts the block size? for ex  Samsung K9K1208Q0C at 0x2000000 (64 MB, 16 kB sector) NAND has 16 kB block size and I have build uboot on DM8127 platform, my u-boot.min is of 91K. So I am not able to relate the above description in terms of NAND block size and actual u-boot.min size.

It will be great if somebody please help me to understand this.

Thanks & Regards,

Suresh

  • Hi Suresh,

    RBL can be activated by special jumper settings. Therefore you shold pay attention on the jumper configuration on your board.
    After that step I suggest you to read the linked Booting and flashing guide:
    www.ti.com/.../spraai4a.pdf
    and you can find more details about RBL at:
    processors.wiki.ti.com/.../Integra_Nand_Boot_FAQ

    BR
    Tsvetolin Shulev
  • Hello,

    The RBL will look for 4 sectors (sector = erase size of chip), for the second stage bootloader.

    what you can do is from your linux side create 4 partitions for nand (sector size), and then use mtdutils (nandwrite) to flash the images onto the all 4 partitions.
    From uboot side you can use nand write command to flash image onto nand.

    Cheers,
    --Prabhakar Lad
  • Hi Cvetolin and Prabhakar,

    Thanks for the inputs.

    What I want is I want to write 5 uboot.min.nand into first 5 blocks of NAND so if any blocks is having ECC error, RBL will look into another blocks. But the confusion is "Another question is how RBL counts the block size? for ex Samsung K9K1208Q0C at 0x2000000 (64 MB, 16 kB sector) NAND has 16 kB block size and I have build uboot on DM8127 platform, my u-boot.min is of 91K. So I am not able to relate the above description in terms of NAND block size and actual u-boot.min size." I mentioned in my question.

    My target is to safe Boot process if there is any NAND ECC error. I want to achieve this using bootscript (i.e. from uboot using nand write ). I want to do this for both first stage (u-boot.min.nand) and second stage (u-boot.bin) boot loader.

    I am thinking about below memory map. So If any ECC error occur it will try 5 times for boot.
    u-boot.min.nand
    u-boot.min.nand
    u-boot.min.nand
    u-boot.min.nand
    u-boot.min.nand
    u-boot.bin
    u-boot.bin
    u-boot.bin
    u-boot.bin
    u-boot.bin
    u-boot.env
    Primary Kernel
    Primary File system
    Secondary Kernel
    Secondary File system
    Data

    Please let me know the possible way to achieve this using RBL native features and U-boot bootscript.

    Thanks,
    Suresh
  • Hello,

    Can you boot from other bootmode aprat from nand ? does that bootmode detect nand ? If yes when uboot comes up,
    hit following commnad
    'nand info'
    It will print the sector size
    So RBL will look into each of these in sector size, for example if sector size is 128K
    the rbl will look for each block of 128K into nand.

    No coming to flashing these images:
    you can do it 2 ways:
    1: From uboot: Load the images to ram from MMC card or other peripheral and use uboot commands to finally flash them to nand
    (nand read/nand write/nand erase)

    2: From Linux: Use mtdutils to flash it.

    Hope that clears your doubt.

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    Now it is clear.

    Thanks for the detailed explanation.

    Regards,
    Suresh