WAY1: Ceate UBI Image, write to flash directly
./mkfs.ubifs -r dir -m 2048 -e 126976 -c2047 -F -o ubifs.img
./ubinize -o ubifs -p 131072 -m 2048 -s 2048 ubicfg.ini
#flash_eraseall /dev/mtd10
#nandwrite /dev/mtd10 ubifs
#ubiattach /dev/ubi_ctrl -m 10
#mount -t ubifs ubi0_0 /mnt
WAY2: Ceate UBIFS Image, create volume manually, use ubi write volume tool to write flash
==>Create ubifs image(PC side)
./mkfs.ubifs -r dir -m 2048 -e 126976 -c 2048 -o ubifs.img
==> Mount UBIFS(Camera side)
1) Erase MTD
#flash_eraseall /dev/mtd10
2) manual attach/detach ubi to mtd
#ubiattach /dev/ubi_ctrl -m 10
3)manual create ubi volume
#ubimkvol /dev/ubi0 -N volume_name -s 13107200
4) write img to ubi volume
#ubiupdatevol /dev/ubi0_0 ubi.img
4) Mount ubifs
#mount -t ubifs ubi0_0 /mnt或mount -t ubifs ubi0:rootfs /mnt
==> Reboot and test
1) ubiattach /dev/ubi_ctrl -m 10
2) mount -t ubifs ubi0_0 /mnt
Reference:
1) http://blog.csdn.net/chongzi865458/article/details/6665978
2) http://wenku.baidu.com/link?url=qSuC0MfxVjEvA--_t825kIZTLRXoJsIQCdfxkP8Mxbm4RIf8T6-quUmf6A1aIjyS48A3dnrcHVYH745A9Jh9CTLK0prMDns7QBM5PKqcNhO
./mkfs.ubifs -r dir -m 2048 -e 126976 -c2047 -F -o ubifs.img
./ubinize -o ubifs -p 131072 -m 2048 -s 2048 ubicfg.ini
#flash_eraseall /dev/mtd10
#nandwrite /dev/mtd10 ubifs
#ubiattach /dev/ubi_ctrl -m 10
#mount -t ubifs ubi0_0 /mnt
WAY2: Ceate UBIFS Image, create volume manually, use ubi write volume tool to write flash
==>Create ubifs image(PC side)
./mkfs.ubifs -r dir -m 2048 -e 126976 -c 2048 -o ubifs.img
==> Mount UBIFS(Camera side)
1) Erase MTD
#flash_eraseall /dev/mtd10
2) manual attach/detach ubi to mtd
#ubiattach /dev/ubi_ctrl -m 10
3)manual create ubi volume
#ubimkvol /dev/ubi0 -N volume_name -s 13107200
4) write img to ubi volume
#ubiupdatevol /dev/ubi0_0 ubi.img
4) Mount ubifs
#mount -t ubifs ubi0_0 /mnt或mount -t ubifs ubi0:rootfs /mnt
==> Reboot and test
1) ubiattach /dev/ubi_ctrl -m 10
2) mount -t ubifs ubi0_0 /mnt
Reference:
1) http://blog.csdn.net/chongzi865458/article/details/6665978
2) http://wenku.baidu.com/link?url=qSuC0MfxVjEvA--_t825kIZTLRXoJsIQCdfxkP8Mxbm4RIf8T6-quUmf6A1aIjyS48A3dnrcHVYH745A9Jh9CTLK0prMDns7QBM5PKqcNhO