Open main menu

DAVE Developer's Wiki β

Changes

Memory Tecnology Device (MTD)

33 bytes added, 15:12, 14 May 2012
JFFS2
The Journaled Flash File System v.2 provides non-volatile storing and compression of data on flash devices. For more details about is please see http://www.linux-mtd.infradead.org/doc/jffs2.html. It can be a good choice for not too big flash partitions (as a reference, not bigger than 128 MByte).
The default Lets assume the MTD partition associated to the NAND flash is mapped as number ...5. Please note that the same technique can be used with the NOR Flash partitions.
Let’s assume we run the kernel by using the [[Booting_Linux_Kernel#Configuration_net_nfs|net_nfs configuration as described ..]]. From the target shell, run
<pre class="board-terminal">
cat /proc/mtd
<pre class="board-terminal">
eraseall /dev/mtd4mtd5
</pre>
<pre class="board-terminal">
mount -t jffs2 /dev/mtdblock4 mtdblock5 /mnt/nand
</pre>
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/mtdblock4 mtdblock5 on /mnt/nand type jffs2 (rw)
</pre>
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nfs 99077740 44983688 54094052 46% /
/dev/mtdblock4 mtdblock5 32768 912 31856 3% /mnt/nand
</pre>
<pre class="board-terminal">
setenv nandargs 'setenv bootargs root=/dev/mtdblock4 mtdblock5 rw rootflags=noatime rootfstype=jffs2'
</pre>
# mount
rootfs on / type rootfs (rw)
/dev/mtdblock4 mtdblock5 on / type jffs2 (rw,noatime)
/proc on /proc type proc (rw,nodiratime)
</pre>
customer
235
edits