Please refer to the following procedure to make ubifs.
root@localhost:~# zcat /proc/config.gz | grep CONFIG_MTD_UBI=y
CONFIG_MTD_UBI=y
root@localhost:~# flash_erase /dev/mtd2 0 0
root@localhost:~# ubiattach /dev/ubi_ctrl -m 2
UBI device number 0, total 1788 LEBs (454066176 bytes, 433.0 MiB), available 1748 LEBs (443908096 bytes, 423.3 MiB), LEB size 253952 bytes (248.0 KiB)
root@localhost:~# cat /sys/class/ubi/ubi0/max_vol_count
128
root@localhost:~# ubimkvol /dev/ubi0 -N ubi_rootfs -S 128
Volume ID 0, size 128 LEBs (32505856 bytes, 31.0 MiB), LEB size 253952 bytes (248.0 KiB), dynamic, name "ubi_rootfs", alignment 1
root@localhost:~# mkdir -p mnt;mount -t ubifs ubi0_0 mnt
root@localhost:~# umount -l ubi0_0