Back up of the "Factory Bad Block Table" BBT, needed or a waste of time?

Visti Andresen talpa at
Sun Jul 29 17:26:06 CEST 2007

On Sun, 29 Jul 2007 14:41:41 +0800
Harald Welte <laforge at> wrote:

> On Sat, Jul 28, 2007 at 02:46:24PM +0200, Visti Andresen wrote:
> > I'm probably going to receive my Neo next Monday (the joy).
> good luck.
> > The gpsd should be backed up by the procedure in:
> >
> this is not present on phase-1 handsets and only accidentially ended up
> on the GTA01Bv4 that were sent to phase-0 developers before.  I've
> updated the wiki accordingly.

Ahh yes the GLLIN driver will be available at some point in time:
So there is no need to back up anything as I have "the source" :)

I wish Nokia was this open about there hardware/software for the
N770 and N800,  oh well....

> > and inside the bad block table (BBT), I guess that the BBT isn't located 
> > inside the 4. partition and therefor not backed up?
> >
> well, technically it is in the rootfs partition... but in blocks that
> are marked as bad blocks ;) so depending on the method of your backup,
> you will either have it or not.

I suppose it is marked as a bad block inside JFS2?

Should I go look for the OOB special markers (BBT0/BBT1)?
or can I simply look for 
"the last two good blocks at the end of NAND" as suggested by:

> > ==========
> > Is it necessary to back up the BBT alt all?
> Depends on what you want to do.  It makes sense.  In fact, I have asked
> our production software team multiple times to store the bad-block
> information at the factory for each device, so we can theoretically
> restore that information for any given device.  I don't know the status
> of it, though.

I'm currently experimenting with creating a program that reads the "Bad Block Table".
It also seams I can get a list of bad nand blocks using the "nand bad" u-boot command

> > Can the "factory BBT" be recreated using JTAG?
> not if you erase all inline and OOB data by something like 'nand scrub'
> of u-boot.  This will erase everything!
> > or has the factory used a special kind of "magic" when
> > establishing the BBT?

I was thinking more along the lines of, if they were writing it with bit patterns
like memtest86 to detect the bad blocks.
(which we might also do in an attempt to find bad blocks) 

If they were probing the values of the ones and zeros to determine a 
statistical probability that the cell is faulty.
Consulted the "Oracle of Delphi", or used other means unavailable to us.

The data sheet don't tell how they do it, so I'm assuming you don't
know either...

Anyway thank you for your time and answer, I think I will try to backup
the bad block info using u-boot "nand bad" and my C program 
(given that I get to work)

> no.  it just scans the nand flash for factory bad block markers (see
> nand data sheet) and creates its own table (for faster access and as a
> backup copy).

Ah yes nothing like sitting with a cup of coffee reading a good data sheet a 
Sunday afternoon.

It seems that the factory bad block info is located in the sixth OOB byte
in the first or second page of a nand block.
Any non 0xff values marks the block as bad.

I'm updating the bad block wiki to include this info...
Please correct me if I'm wrong.

> -- 
> - Harald Welte <laforge at>         
> ============================================================================
> Software for the world's first truly open Free Software mobile phone
> _______________________________________________
> OpenMoko community mailing list
> community at

More information about the community mailing list