NAND and JFFS2 crash

Thomas Gleixner tglx at linutronix.de
Mon Apr 28 04:54:22 EDT 2003


On Thursday 24 April 2003 12:22, simon at baydel.com wrote:
> Last week I downloaded a new CVS tree. I create my SMC data by
> booting the system off a hard disk running Linux. I first use dd to
> copy the hard disk boot partition to the SMC. I noticed all these
> messages basically saying writing NAND witout ECC was a bad
> idea. In my NAND specific driver I set up the mtd_info structure for
> soft ecc. However there appears to be a new field useecc which
> only appears to be used by jffs2. I did not know what I was
> expected to do here so I modified my driver to set this and the
> associated bit positions. Beacuse I use partitions I had to modify
> mtdpart to copy this information to the mtd_info structure which is
> set up on a partition basis. Now I could boot from the hard disk and
>  copy my boot disk to the SMC with no problem. I then erased and
> created a new JFFS2 filesystem, on another partition, and copied
> all the files for the root filesystem.

As I mentioned before and as documented in the nand docs, either use 
bootloader or use nandwrite.c to write a fs-image with ecc. There is no need 
to hack around.

> I then booted from the smc and although I got a few
> Empty flash at 0x00469ffcb ends at 0x0046a000
> messages all seemed ok. The root file system was mounted and I
> got the login prompt. However when I started to log in I got a crash.
> kernel BUG at gc.c:140!

I have a binary image now to check this. Will post info, if I have solved the 
problem.

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




More information about the linux-mtd mailing list