Create a yaffs2 File System

Source: Internet
Author: User
Article Title: Create a yaffs2 file system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Because the kernel does not have the yaffs2 file system generation function, you need to add a patch.

1. fsMakefile. path in fs_yaffs2.tgz is the patch for kernel/fs/Makefile

Add the following content to kernel/fs/Makefile:

[Root @ localhost fs_yaffs2] # cat fsMakefile. path

--- Fs/Makefile. orig 2010-01-22 11:43:38. 000000000 + 0800

++ Fs/Makefile 11:44:22. 000000000 + 0800

@-120,3 + 120,5 @@

Obj-$ (CONFIG_DEBUG_FS) + = debugfs/

Obj-$ (CONFIG_OCFS2_FS) + = ocfs2/

Obj-$ (CONFIG_GFS2_FS) + = gfs2/

+ # Patched by YAFFS

+ Obj-$ (CONFIG_YAFFS_FS) + = yaffs2/

[Root @ localhost fs_yaffs2] #

2. Kconfig. patch in fs_yaffs2.tgz is the patch for kernel/fs/Kconfig

In kernel/fs/Kconfig, add the following content:

[Root @ localhost fs_yaffs2] # cat Kconfig. patch

--- Kconfig. pre. yaffs 2010-01-21 12:41:45. 000000000 + 0800

++ Kconfig 2010-01-21 12:41:37. 000000000 + 0800

@-1182,6 + 1182,10 @@

To compile the EFS file system support as a module, choose M here:

Module will be called efs.

+

+ # Patched by YAFFS

+ Source "fs/yaffs2/Kconfig"

+

Config JFFS2_FS

Tristate "Journalling Flash File System v2 (JFFS2) support"

Select CRC32

[Root @ localhost fs_yaffs2] #

Finally, copy yaffs2/to/kerenl/fs.

3. stlinux23-host-yaffs-utils-1.0.0-3.i386.rpm is to install/opt/STM/STLinux-

2.3/host/bin/mkyaffs2image to create yaffs2 fs image.

File System Tools

[Root @ localhost fs_yaffs2] # rpm-ivh stlinux23-host-yaffs-utils-1.0.0-3.i386.rpm -- nodeps -- force

In this way, you can use mkyaffs2image to create the yaffs2 file system ~

4. use apply_yaffs2nand-app.sh

[Root @ localhost hanbang -- mini + fs + for + ramdisk & jffs2 & yaffs2] # cat apply_yaffs2nand-app.sh

Echo "rm./yaffs2fs-app.yaffs2"

Rm/opt/STM/STLinux-2.3/devkit/sh4/yaffs2fs-app.yaffs2

/Opt/STM/STLinux-2.3/host/bin/mkyaffs2image 1/opt/STM/STLinux-2.3/devkit/sh4/target

/Opt/STM/STLinux-2.3/devkit/sh4/yaffs2fs-app.yaffs2

Echo "done !!! "

[Root @ localhost hanbang -- mini + fs + for + ramdisk & jffs2 & yaffs2] #

5. Make a file system: source./apply_yaffs2nand-app.sh

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.