Wednesday, October 8, 2008

clone jffs2

mount -t jffs2 /dev/mtdblock4 /mnt/nand
mount /dev/mmcblk0p2 /mnt/mmc2

I use mmc card as the media to save the rootfs at nand flash. It is not as easy as type: "tar czvf /mnt/mmc2/target.tar.gz /mnt/nand/". It won't work within busybox from the ARM target, could be the problem of tar.

How ever here is the magic:

tar cf - -C /mnt/nand . | tar xvf - -C /mnt/mmc2/target

Then pull the SD card and connect to the Linux PC, copy the file system with simply "cp -r /tftpboot /mnt/mmc2/target".