Re: do i have to "eraseall" first?

Thomas Gleixner
2002-07-31T18:33:47Z

On Wednesday, 31. July 2002 15:04, David Woodhouse wrote:
> kevin@gv.com.tw said:
> > now it report many "magic bitmask not found" do i have to do
> > something like "eraseall /dev/mtdblock1" before "cp test.img /dev/
> > mtdblock1"?
>
> Yes. eraseall /dev/mtd1. I don't remember how you are supposed to write the
> images so the ECC is correct. Thomas?
cp test.img /dev/mtdblock1 should write ecc correct, if it's configured
correctly. See
http://www.linux-mtd.infradead.org/tech/nand.html

But eraseall does not set the block is erased and "jffs2 formatted" info in
the OOB area, which leads to "magic bitmask not found".

We decided some time ago, that erase, invoked from the shell, _CANNOT_ do
this on it's own, because it will not know, which filesystem is going to be
mounted.

The information is set, when erase is controlled by jffs2.

The only safe way to do it, is
cd yourstuff
cp -r * /mnt/bla

or you tell your bootloader to do it.

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