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.

DVR RDK nand flash bad block management? DM8168

Hi,all

     Does  the DVR RDK has the nand flash bad block management module in it? In lot production the u-boot kernel and filesystem are need to be flashed to nand flash.I don't know how to do it.Can it auto-skip the bad block while flash the image?

     Is there a better way to flash the u-boot kernel and filesystem to nand flash in lot produciton?

Thanks,


  • Hi

    We have ECC , and ubifs which can handle what you mentioned issues.

    For production, you can use flash programmer and then send for manufacturing.

    BR

    Eason

  • Hi,Eason

        Thanks for your reply. I want to know if the bad block management module is already exist in the u-boot source code, and how to deal with the bad block?Auto-skip or other methods?

        Best regards

        

        

  • Hi,Eason

         I found the following code in u-boot:

    static int nand_is_bad_block(struct mtd_info *mtd, int block)
    {
    struct nand_chip *this = mtd->priv;

    nand_command(mtd, block, 0, CONFIG_SYS_NAND_BAD_BLOCK_POS, NAND_CMD_READOOB);

    /*
    * Read one byte
    */
    if (readb(this->IO_ADDR_R) != 0xff)
    return 1;

    return 0;
    }

        

    while (block <= lastblock) {
    if (!nand_is_bad_block(mtd, block)) {
    /*
    * Skip bad blocks
    */
    while (page < CONFIG_SYS_NAND_PAGE_COUNT) {
    nand_read_page(mtd, block, page, dst);
    dst += CONFIG_SYS_NAND_PAGE_SIZE;
    page++;
    }

    page = 0;
    } else {
    lastblock++;
    }

    block++;
    }

    return 0;
    }

    It looks like the u-boot auto-skipped the badblock. So should I configure the flash programmer to auto-skip mode?