Open main menu

DAVE Developer's Wiki β

Changes

Memory Tecnology Device (MTD)

25 bytes removed, 15:33, 4 May 2015
m
UBIFS
{{InfoBoxBottom}}
{{WorkInProgress}}
= Memory Technology Devices (MTD) =
You can interact with the MTD subsystem using the MTD Utilities, a collection of tools that can be used to perform operations on Flash devices. For further information on this package, plese refer to http://processors.wiki.ti.com/index.php/MTD_Utilities
Usually the mtd-utils collection is provided as a pre-built binary package. Anyway, it can also be [http://processors.wiki.ti.com/index.php/MTD_Utilities#Target cross-compiled] for the specific target.
== UBI ==
To access and use UBIFS:
* Add the ubi.mtd=X parameter to the kernel command line, where X is the number of the mtd partition
* Erase the MTD partition:
<pre class="board-terminal">
flash_eraseall /dev/mtdX
</pre>
* As an alternative to point 1, launch Launch the following commandto create the UBI volume:
<pre class="board-terminal">
ubiattach /dev/ubi_ctrl -m X
* 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:
<pre class="board-terminal">
ubi.mtd=6 X root=ubi0_0 rootfstype=ubifs rw
</pre>
# the file system is formatted automatically the first time it is mounted
# the mount command don't use the /dev/ prefix before ubi0_0 device
 
== Additional information ==
 
* http://free-electrons.com/blog/managing-flash-storage-with-linux/