Linux file system migration-JFFS2 file system creation
Source: Internet
Author: User
Linux file system transplantation-JFFS2 file system JFFS2 full name is JournallingFlashFileSystemVersion2, is a file system developed by Redhat (flash memory; FlashMemory) [1], its predecessor was JFFS, which was the first to support only...
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. porting environment: www.2cto.com 1, Ubuntu 10.10 release 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. compile zlib to decompress 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 to compile and decompress mtd-snapshot-20050519.tar.bz2 http://download.csdn.net/detail/baby_afu/4418298 And go to mtd/util to compile and install $ tar xvf mtd-snapshot-20050519.tar.bz2 $ cd mtd/util $ make install so that mkfs is available in our system. 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 zImag E \; 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
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