Yay! I have good news :)

I have read a bit more about MTD devices and how they work. A new function
called nanddump() replaces the old and buggy rf_extract() one.

This function has been covardly copied from the nanddump utilty of the
mtd-utils,
it sets the mtd device in raw mode and gets some important information to
make
a proper dump.

mtd3 for example have a page size of 2048 and an OOB one of 64. This means
that
every 0x800 bytes there are 0x40 bytes of internal nand information called
'OOB'.
This information stores some info like a checksum and a mark if it is
corrupted.

The image required to flash does not needs the OOB data.
The new dump shows this information and also checks for bad blocks (but
does not
fixes).

I'm planning to do more tests on the mtd to allow 0xFFFF to repartitionate
the whole
nand, fix bad blocks, and reflash directly from the device. This will make
0xFFFF
a complete flasher inside and outside the device.

Back to the dumping stuff.. There are some problems with the dump, I have
noticed 0 byte
dump for the bootloader pieces (xloader and secondary). I will look for
them, may be
they need a different way to be dumped or I have made something wrong. So
please take
care reflashing the dumps of these pieces.

The safer way to test if a dump/restore works is by reflashing the
initfs.jffs2 piece.

The steps are just the same as before:

 n770$ mkdir /media/mmc1/dump
 n770$ 0xFFFF -e /media/mmc1/dump

The resulting images are stripped to get a reduced size to not completely
fill the partition
which results on blank screen when rebooting (looks like a bug in
secondary when jumping into
initfs). The resulting files should be fine to be reflashed via USB:

 $ mount /mnt/usb
 $ 0xFFFF -p /mnt/usb/dump/initfs.jffs2 -R

Now...Have fun dumping and restoring!!

I would like to know the results on n800. Anybody can test?

This means that we can starting building our own cooked roms to avoid
reinstalling everything
all the time we brick our gadgets for backups or so.

Download link to download sources:

  http://news.nopcode.org/miau/pvc.cgi?dist=0xFFFF

  --pancake


_______________________________________________
0xffff mailing list
0xffff@lists.nopcode.org
https://lists.nopcode.org/mailman/listinfo/0xffff

Reply via email to