Porting of Linux file systems-making JFFS2 file systems

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.