[PATCH] OneNAND: Runtime badblock check support

Artem Bityutskiy dedekind1 at gmail.com
Wed Jul 22 03:28:13 EDT 2009

On 07/22/2009 10:11 AM, Kyungmin Park wrote:
> It don't avoid the double-scanning issue. only partial scan at
> bootloader. In my environemt kernel has 2MiB partition and we only
> scan this partition at load kernel command.
> Exactly that it skip the bad block scanning except the kernel
> partition at bootloader
> As bootcmd load kernel, it first check that read block is bad, if not
> read this block, next check again next block, and read next block and
> so on.

So you have a small kernel partition, you store the kernel there.
Your boot-loader reads the kernel partition and loads the kernel
from there. And of course the boot-loader scans the kernel partition
for bad block. And your boot-loader does not need to scan anything
else. I understand this part.

But what is next? Do you want to tell the kernel to avoid scanning the
kernel partition because boot-loader has already scanned it? Sorry, I
still cannot get the idea...

> I don't have any idea about on-flash BBT.

It is standard mechanism which exists in MTD from early tglx1 times.
MTD can keep BBT on flash, AFAIR, in the last eraseblock. Look for the
NAND_USE_FLASH_BBT constant. And this is the way to go if you want to
optimize BBT scanning, IMO.

Best Regards,
Artem Bityutskiy (Артём Битюцкий)

More information about the linux-mtd mailing list