Linux File System migration-JFFS2 file system creation

Source: Internet
Author: User


Linux File System transplantation-JFFS2 File System JFFS2 full name is Journalling Flash File System Version2, is a Flash Memory developed by Redhat (short: Flash Memory; English: Flash Memory) file System [1], its predecessor is JFFS, which only supports NOR Flash at the earliest. It has been supporting NAND Flash since version 2.6 and is very suitable for embedded systems.
JFFS2 features: supports NAND flash devices. Hard links ). This is a feature that JFFS cannot support due to file formats. Compression. Three algorithms are available: zlib, rubin, and rtime. For better performance.
Disadvantage: JFFS2 scans all the data in flash during mounting and stores the directory of the file system in system memory, which leads to linear growth and consumes a lot of time. JFFS2 does not have a write-back mechanism and cannot store data in cache, so that flash I/O operations are frequent. The JFFS2 design mechanism is too complex and the code is not easy to read.
I. Transplantation environment: www.2cto.com 1, Ubuntu 10.10 release version 2, u-boot.bin http://download.csdn.net/detail/baby_afu/44128263, target machine: FS_S5PC100 Platform 4, cross compiler arm-cortex_a8-linux-gnueabi-gcc Article 2, the production of jffs2 File system 1, configure the Kernel support jffs2 File system $ make menuconfig File system ---> [*] Miscellaneous filesystems ---> <*> Journalling flash File System v2 (JFFS2) support 2, zlib compilation decompression zlib-1 .2.3.tar.bz2 http://download.csdn.net/detail/baby_afu/4418294 and enter the zlib-1.2.3 configuration to compile and install $ tar xvf zlib-1.2.3.tar.bz2 $ cd zlib-1.2.3 www.2cto.com $. /configure $ make install 3. mtd tool compilation decompress mtd-snapshot-20050519.tar.bz2 unzip $ tar xvf mtd-snapshot-20050519.tar.bz2 $ cd mtd/util $ make install so that our system has mkfs. jffs2 tool 4. jffs2 file system image creation $ mkfs. Jffs2-r/source/rootfs-o rootfs. jffs2-e 0x4000 -- pad = 0x800000-n $ cp rootfs. jffs2/tftpboot www.2cto.com 5, jffs2 File System burning write # tftp 30008000 rootfs. jffs2 # nand erase 500000 800000 # nand write 30008000 500000 800000 6. Set the u-boot startup parameter # setenv bootcmd tftp 33000000 zImage \; go 33000000 # setenv bootargs root =/dev/mtdblock2 init =/linuxrc rootfstype = jffs2 rw console = ttySAC0, 115200 # savenv restart the Development Board to check whether it is successful. Author lr_ting

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.