[PATCH] nandwrite: add --nobad to write bad blocks

Jon Povey Jon.Povey at racelogic.co.uk
Wed Sep 29 23:23:15 EDT 2010


Iwo Mergler wrote:
> Jon Povey wrote:
> Although I would always use an in-flash BBT for this kind of
> situation. As you say, there are bootloaders, filesystems and
> hardware ECC that will only work if you re-purpose the bad block
> marker region in the OOB.
>
> In such a case, just do the bad block scan once, at production time,
> and write the BBT. Then change everything else to use that BBT. And
> you leave the BBT alone during reflash.

I agree this is a nice way to do it, if it's practical.

> In the case you describe, I would use the old BBT to create the
> new one directly, without attempting to write to the bad blocks.

That's what I did, but note mtd won't allow you to rewrite the BBTs,
they are hardwired to be off-limits in the kernel. So, you have to
do something like write a new bootloader that can translate it on
reboot. Happily that has been OK for me, but it's not ideal, and one
may be in a position where that is difficult (restricted code size for
bootloader and such)

The inability to rewrite the BBT from linux is a separate issue though.

>> Either way, I for one need to do these kind of low-level hacks, and
>> if mtd kernel or utils have policy hardwired into them, happily I
>> have the source and a compiler and can fix that locally.
>
> I agree. I only wrote what I did to maybe contribute to the
> documentation. There seemed to be the sentiment that the tools
> only skiped bad blocks because of some silly tradition.
>
> I'm all in favour of adding the feature.

Ah, I thought you were against it.
Jolly good.

--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network





More information about the linux-mtd mailing list