public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Bad Block Handling in jffs2
@ 2003-01-30 16:17 Kschoo70C
  2003-01-30 19:16 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Kschoo70C @ 2003-01-30 16:17 UTC (permalink / raw)
  To: linux-mtd

Hi,
   My nand device has a few bad blocks. Therefore if I copy the jffs2 formated 
   image to the device, some files are missing from the file systems.
 
   In http://www.linux-mtd.infradead.org/tech/nand.html, it is stated that 
   
   "if you have a bad block on your chip, just skip this block and copy 
   the data to the next block. JFFS2 is able to handle this gap.".

   So, I write a program to skip the bad block, and copy the data to the next block. 
   The missing file seems to appear on the file system now, the size looks correct. 
   But when I diff the binary of the file to that of original, they are different 
   and the binary failed to execute.

   I don't know much about jffs2 bad block handling, the only information I have is 
   as mentioned above. Am I missing any other information ?

   Is anyone manage to transfer an image to the nand device that has bad blocks 
   without losing any files ?

   Note that there is no problem to copy the same image to nand devices 
   which are bad blocks free 

   Thanks in advance.

regards
choo


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bad Block Handling in jffs2
  2003-01-30 16:17 Bad Block Handling in jffs2 Kschoo70C
@ 2003-01-30 19:16 ` Thomas Gleixner
  2003-01-30 20:03   ` kokseng choo
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2003-01-30 19:16 UTC (permalink / raw)
  To: Kschoo70C, linux-mtd

On Thursday 30 January 2003 17:17, Kschoo70C@netscape.net wrote:
>    In http://www.linux-mtd.infradead.org/tech/nand.html, it is stated that
>
>    "if you have a bad block on your chip, just skip this block and copy
>    the data to the next block. JFFS2 is able to handle this gap.".
That's correct.

>    So, I write a program to skip the bad block, and copy the data to the
> next block. The missing file seems to appear on the file system now, the
> size looks correct. But when I diff the binary of the file to that of
> original, they are different and the binary failed to execute.
Strange.
Have you built your fs-image with the correct block size ?

>    I don't know much about jffs2 bad block handling, the only information I
> have is as mentioned above. Am I missing any other information ?
No

>    Is anyone manage to transfer an image to the nand device that has bad
> blocks without losing any files ?
Yes, I do

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bad Block Handling in jffs2
  2003-01-30 19:16 ` Thomas Gleixner
@ 2003-01-30 20:03   ` kokseng choo
  0 siblings, 0 replies; 3+ messages in thread
From: kokseng choo @ 2003-01-30 20:03 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

Hi Thomas,

Thanks for your reply.

Thomas Gleixner wrote:

>>   So, I write a program to skip the bad block, and copy the data to the
>>next block. The missing file seems to appear on the file system now, the
>>size looks correct. But when I diff the binary of the file to that of
>>original, they are different and the binary failed to execute.
>>    
>>
>Strange.
>Have you built your fs-image with the correct block size ?
>
  The command I used is as followed:
mkfs.jffs2 -p --eraseblock=16KiB -l -d ./jffsRoot -o jffs2.image
I changed the mkfs.jffs2 so that it allows me to create image with 16KiB 
erased size. I presumed it is not a problem to make the changed, but may 
be I was wrong. The raised the question about my changes sometimes ago 
in http://lists.infradead.org/pipermail/linux-mtd/2002-October/006273.html..
Please let me know, if my assumption is wrong.

>  
>
>> Is anyone manage to transfer an image to the nand device that has bad
>>blocks without losing any files ?
>>    
>>
>Yes, I do
>
>  
>
That sounds a lot more promising. Probably there is somthing wrong my 
configuration, I will look into my configuration again.

cheers
choo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-30 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30 16:17 Bad Block Handling in jffs2 Kschoo70C
2003-01-30 19:16 ` Thomas Gleixner
2003-01-30 20:03   ` kokseng choo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox