View Single Post
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#31
Originally Posted by tolou View Post
Thanks,
and will I be able to reflash the internal rootfs from a mmc booted OS, using this 'flasher -f -r rootfs.jffs2' ?
Yes, but not via flasher. You need to use mtd-utils. I did it few times. There is no simple way but you can use tools from initfs flasher. This is what I do:

When I like current stable system in flash (after clean reflashing and tweaking it a bit) I boot from mmc and do a backup

Code:
mount -t jffs2 /dev/mtdblock4 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
umount /opt
There is also optional sumtool command that optimizes the image a bit for faster mounting.

Code:
sumtool -i rootfs.jffs2 -o rootfs.faster.jffs2  -e 128KiB -l -n
then when I want to restore system in flash I boot from mmc and do

Code:
./flash_eraseall -j /dev/mtd4
./nandwrite -a -p /dev/mtd4 /media/mmc1/rootfs.jffs2
Be sure to use correct device name (/dev/mtd4 for rootfs) and never ever use -j option of nandwrite. Also never ever erase or flash /dev/mtd1 or mtd0. By doing this you can seriously screw your device to the point that reflashing will not help you (and won't be posible at all).
 

The Following 8 Users Say Thank You to fanoush For This Useful Post: