The full name of the JFFS2 is the journalling Flash file system Version2, which was developed by Redhat Corporation (flash memory; English: Flash memory), and its predecessor was jffs, The earliest support is nor Flash, since the 2.6 version of the support NAND flash, very suitable for use in embedded systems.
The JFFS2 functions are as follows:
- Support NAND flash device.
- Hard links. This is a feature that jffs is unable to support in the file format.
- Compression. There are three kinds of algorithms: Zlib, Rubin and Rtime.
- Better performance.
Disadvantages:
- JFFS2 on Mount (Mount) will scan all the data, and then the file system directory stored in system memory, will be linear multiple growth, consuming a lot of time.
- JFFS2 does not have a write-back mechanism to temporarily store data in cache so that flash I/O is frequently active.
- JFFS2 design mechanism is too complex, code is difficult to read.
First, the transplant environment:
1. Ubuntu 10.10 Release
2, U-boot.bin
3. Target machine: fs_s5pc100 platform
4. Cross compiler ARM-CORTEX_A8-LINUX-GNUEABI-GCC
---------------------------------------------------------------------
second, the production JFFS2 File System
1. Configuration kernel supports JFFS2 file system
$ make Menuconfig
File system---> [*] Miscellaneous filesystems---> <*> journalling Flash File System v2 (JFFS2 ) Support
2, the compilation of zlib
unzip zlib-1.2.3.tar.bz2 and go to zlib-1.2.3 configuration compilation installation
$ tar xvf zlib-1.2. 3 . tar.bz2 $ cd zlib-1.2. 3 $ . /Configure $ make $ make install
3. MTD Tool Compilation
Unzip the mtd-snapshot-20050519.tar.bz2 and enter Mtd/util to compile the installation
$ tar xvf mtd-snapshot-20050519. tar.bz2 $ cd MTD/util $ make $ make install
So we have the MKFS.JFFS2 tool in our system.
4, JFFS2 file system image production
0x4000 --pad=0x800000 -/tftpboot
5, JFFS2 file system burn Write
30008000 ROOTFS.JFFS2 # NAND erase 500000 800000 # NAND write 30008000 Span style= "margin:0px; padding:0px; line-height:1.5; Color: #800080; " >500000 800000
6. Set U-boot startup Parameters
# setenv Bootcmd tftp 3300000033000000 # setenv Bootargs root=/dev/mtdblock2 init= /LINUXRC rootfstype=jffs2 rw console=ttysac0,115200 # savenv
Restart the development Board to see if it is successful.
Porting of Linux file systems-making JFFS2 file systems