[#4285] Enabling CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC will introduce more and more NAND flash bad blocks.

Document created by Aaronwu Employee on Aug 29, 2013
Version 1Show Document
  • View in full screen mode

[#4285] Enabling CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC will introduce more and more NAND flash bad blocks.

Submitted By: Bryan Wu

Open Date

2008-07-28 05:20:02     Close Date

2008-07-28 06:23:05

Priority:

Medium     Assignee:

Mike Frysinger

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

N/A     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

App binary format:

N/A     

Summary: Enabling CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC will introduce more and more NAND flash bad blocks.

Details:

 

When CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC enabled, after some NAND flash writing operation such as erasing/mount YAFFS2/write something to YAFFS2, it will introduce more and more NAND flash bad blocks.

 

It was found in branch 08r1, but I guess it can also be found in trunk. When I disable the CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC, the bug is gone.

 

-Bryan

 

Follow-ups

 

--- Mike Frysinger                                           2008-07-28 05:38:30

this isnt a bug.  the different layout uses a different byte in the spare page

to mark the block bad.  if you want to switch layouts on a NAND device, you need

to scrub it and redetect bad blocks.

 

--- Mike Frysinger                                           2008-07-28 05:58:23

also, this has been documented here:

  docs.blackfin.uclinux.org/doku.php?id=bootloaders:bootrom#details

 

--- Bryan Wu                                                 2008-07-28 06:23:04

Right, we got your point here. So if people want to try boot U-BOOT from NAND

and Linux kernel supporting that kind NAND operation, they should do following

things:

 

1. U-BOOT enable CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC and compile the U-boot

2. use this U-Boot to scrub the whole NAND device

3. Linux kernel enable CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC and compile the

kernel

4. Programing the U-boot and kernel image to NAND by U-Boot

5. Let bootrom boot U-boot, u-boot to boot kenrel.

6. When kernel boots up, we can program the NAND device in Linux kernel.

 

Right? I think so.

Close it.

 

-Bryan

 

--- Mike Frysinger                                           2008-07-28 06:38:15

i think you can use userspace nand tools to also do the scrubbing step, but

generally yes, you've got the idea.  it's a pain :/.

 

--- Bryan Wu                                                 2008-07-28 09:33:31

Oh, how to scrub in Linux userspace?

I just found eraseall, erase, flashcp, nanddump and nandtest.

 

-Bryan

 

--- Mike Frysinger                                           2008-07-28 11:19:57

no idea ... i just assumed you could somehow

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes