mtd_debug usage

Duke ezbonites at gmail.com
Tue Nov 21 11:26:11 EST 2006


Hi All,
I'm having a bit of trouble understanding the usage to mtd_debug.

With the usage format below, why would I need <offset> and <len> if
the mtdblock sizes are already known? (i.e at boot)
I always thought if I write "mtd_debug erase /dev/mtdblock2" it will
erase the entire /dev/mtdblock2 device. not so?
If not, do I specify "mtd_debug erase /dev/mtdblock2 0x0 0x600000" for
mtdblock2 where 0x0 indicated the start of the block?

When I do a write "mtd_debug write /dev/mtdblock2 0x0 0x600000 myfs.cramfs"
would it do just this?

I've seen usage where /dev/mtd2 is used instead of /dev/mtdblock2,
what is the difference here? which should it be. It seems to me that
/dev/mtd2 simply gives the node info (mtd_debug info )and
/dev/mtdblock2 is really what you want to used. Do I have this
correct?

usage: mtd_debug info <device>
       mtd_debug read <device> <offset> <len> <dest-filename>
       mtd_debug write <device> <offset> <len> <source-filename>
       mtd_debug erase <device> <offset> <len>

Thanks.




More information about the linux-mtd mailing list