mtd2 partition mapping on mtd1?...

Jörn Engel joern at wohnheim.fh-wedel.de
Sat Nov 2 15:02:37 EST 2002


On Sat, 2 November 2002 09:52:47 +0000, vijay vijay wrote:
> Have added 3 partitions in mtd. The root filesystem is cramfs type.
> Since it was not being located by default, hardcoded cramfs_read
> to return the rootfs addr. Now the target is coming up..Am getting
> below results too...
> 
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 000c0000 00020000 "boot firmware + kernel"
> mtd1: 00200000 00020000 "cramfs partition"
> mtd2: 00100000 00020000 "test partition"
> 
> # mount
> /dev/root on / type cramfs (rw)
> /proc on /proc type proc (rw)
> ramfs on /var type ramfs (rw)
> 
> Now, "cat /dev/mtd1" and "cat /dev/mtd2" are both fetching
> same data. How's that?. A dd to /dev/mtd2 is going as..

What do you get on "ls -l /dev/mtd?" ?
I'd like to be sure what device we are dealing with.

> # busybox dd if=mtd2fs.bin bs=94208 of=/dev/mtd2 count=1
> MTD_open
> MTD_write
> vijay mtd_write (?=E
> (vijay) in physmap_write32(data=0xaa00aa, adr=0x1554)
> (vijay) in physmap_write32(data=0x550055, adr=0xaa8)
> (vijay) in physmap_write32(data=0x200020, adr=0x1554)
> (vijay) in physmap_write32(data=0xa000a0, adr=0x0)
> (vijay) in physmap_write32(data=0x28cd3d45, adr=0x400000)
> (vijay) in physmap_read32(0xc3ba3000)
> (vijay) in physmap_read32(0xc3ba3000)
> (vijay) in physmap_read32(0xc3ba3000)
> (vijay) in physmap_read32(0xc3ba3000)
> :
> :
> :
> (vijay) in physmap_read32(0xc3ba3000)
> (vijay) in physmap_read32(0xc3ba3000)
> (vijay) in physmap_read32(0xc3ba3000)
> Last[3] is d726c2a6, datum is 28cd3d45
> (vijay) in physmap_write32(data=0xf000f0, adr=0x0)
> (vijay) in physmap_write32(data=0x900090, adr=0x0)
> (vijay) in physmap_write32(data=0x0, adr=0x0)
> dd: /dev/mtd2: Input/output error
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> MTD_close
> 
> On "cat /dev/mtd2", am still seeing old data(as on mtd1)?.

This does not surprise me. Something went wrong on the write. Can you
narrow the options down a little? Make sure that you don't have an
-ro-device, check wether flash is locked, etc.

The flash is nor, I suppose.

Jörn

-- 
When in doubt, use brute force.
-- Ken Thompson




More information about the linux-mtd mailing list