Help needed with MTD on AT91SAM9263-EK please.

James jamessteward at optusnet.com.au
Sun May 25 18:50:45 EDT 2008


On Fri, 2008-05-23 at 09:27 +0200, Richard Genoud wrote:
> 2008/5/23 James <jamessteward at optusnet.com.au>:
> > What tool chain are you using?
> i think it was buildroot + gcc3.4.6 and glib2.3.2, but i'm not sure.
> 
> On Fri, 2008-05-23 at 09:03 +0200, Alessandro Rubini wrote:
> > So you should only write the boot code with sam-ba, and write your
> > kernel and filesystem from either u-boot or linux. You'll probably
> > want to erase and re-program the boot loader from itself, to get rid
> > of remaining wrong sam-ba bits.
> I agree with Alessandro, don't rely to much on sam-ba for nand writing.
> That's why I asked you to do the test from linux (erase/mount/write/read)

root at at91sam9263ek:~/mtd-tools$ ./flash_eraseall -j /dev/mtd0
Erasing 128 Kibyte @ 3ee0000 -- 99 % complete. Cleanmarker written at
3ee0000.
root at at91sam9263ek:~/mtd-tools$ mount -t
jffs2 /dev/mtdblock0  /mnt/nand/
mtd->read(0x400 bytes from 0xa00000) returned ECC error
mtd->read(0x400 bytes from 0xdc0000) returned ECC error
mtd->read(0x400 bytes from 0xfa0000) returned ECC error
mtd->read(0x400 bytes from 0x13e0000) returned ECC error
mtd->read(0x400 bytes from 0x2000000) returned ECC error
mtd->read(0x400 bytes from 0x20e0000) returned ECC error
mtd->read(0x400 bytes from 0x2680000) returned ECC error
mtd->read(0x400 bytes from 0x2fc0000) returned ECC error
mtd->read(0x400 bytes from 0x3540000) returned ECC error
mtd->read(0x400 bytes from 0x3820000) returned ECC error
root at at91sam9263ek:~/mtd-tools$ umount /mnt/nand/

Then I tried this;
root at at91sam9263ek:~/mtd-tools$ ./nandwrite -a /dev/mtd0 ./fs.jffs2 
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
<snip>
root at at91sam9263ek:~/mtd-tools$ mount -t
jffs2 /dev/mtdblock0  /mnt/nand/
mtd->read(0x1fc0c bytes from 0x3f4) returned ECC error
mtd->read(0x800 bytes from 0x3f800) returned ECC error
mtd->read(0x1f6d4 bytes from 0x2092c) returned ECC error
mtd->read(0x1f7dc bytes from 0x40824) returned ECC error
jffs2_scan_inode_node(): CRC failed on node at 0x0005b020: Read
0x31199cbf, calculated 0x81b0002e
mtd->read(0x1fbf0 bytes from 0x60410) returned ECC error
jffs2_scan_inode_node(): CRC failed on node at 0x00060a4c: Read
0x2072000c, calculated 0x207200ff
mtd->read(0x1f6d8 bytes from 0x80928) returned ECC error
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094c88:
0x578a instead

<big snip - lots more>

Hardware failures?  Or have I not used the tools correctly?

Regards,
James.





More information about the linux-mtd mailing list