1.配置ubi and ubifs () 配置内核支持UBIFS Device Drivers --->Memory Technology Device (MTD) support --->UBI - Unsorted block images --->Enable UBI 配置mtd支持UBI接口 File systems --->Miscellaneous filesystems --->UBIFS file system support
2.manual attach/detach ubi to mtd (手动设置/取消 ubi和mtd分区的关联) ./ubiattach /dev/ubi_ctrl -m mtdnumber ./ubidetaach /dev/ubi_ctrl -m mtdnumber
3.manual create ubi volume (设定volume 大小(不是固定值,可以用工具改变)及名称 ) ./ubimkvol /dev/ubi_device_number -s size -N name like: ./ubimkvol /dev/ubi0 -s 300MiB -N ubifs1
4.mount ubifs volume (挂分区) mount -t ubifs ubi0:ubifs1 /tmp/ubifs1
5.ubi node and ubi_ctrl node (查看ubi和ubi_ctrl主节点信息) #cat /sys/class/misc/ubi_ctrl/dev 10:63 加入/dev下没有ubi_ctrl,则我们可以sudo mknod ubi_ctrl c 10 63创建一个端点
#./ubiattach /dev/ubi_ctrl -m 6 #cat /sys/class/ubi/ubi0/dev 252:0 当我们attach ubi0 to mtd6后,如果/dev下没有ubi0,则创建一个,sudo mknod ubi0 c 252 0