Open main menu

DAVE Developer's Wiki β

Changes

Memory Tecnology Device (MTD)

95 bytes added, 16:39, 11 May 2012
no edit summary
# Add the ubi.mtd=X parameter to the kernel command line, where X is the number of the mtd partition
# Erase the MTD partition:
<shellpre class="board-terminal">
flash_eraseall /dev/mtdX
</shellpre>
# As an alternative to point 1, launch the following command:
<shellpre class="board-terminal">
ubiattach /dev/ubi_ctrl -m X
</shellpre>
# The device /dev/ubi0 is now available. To create the UBI volume, launch the following command (-N sets the name and -s sets the size of the volume):
<shellpre class="board-terminal">
ubimkvol /dev/ubi0 -N rootfs -s 128MiB
</shellpre>
# The device /dev/ubi0_0 is now available and can be mounted with one of the following comands:
<shellpre class="board-terminal">
mount -t ubifs ubi0_0 /mnt/ubifs
mount -t ubifs ubi0:rootfs /mnt/ubifs
</shellpre>
# To mount the UBI file system as root file system, the binding between MTD and UBI must be specified from the kernel command line, adding the following parameters:
<shellpre class="board-terminal">
ubi.mtd=6 root=ubi0_0 rootfstype=ubifs rw
</shellpre>
Please note that
customer
235
edits