1. Modify MTD driver source to support yaffs file system
846 lines in the/drivers/mtd/nand/s3c2410.c
Modify
chip->ecc.mode = Nand_ecc_soft;
to be
Chip->ecc.mode = Nand_ecc_none; /* by Zhutao * /
2. Get yaffs
Method 1): (This version of YAFFS2 did not succeed)
official website
Http://www.yaffs.net/download-yaffs-using-git
Get command:
git clone git://www.aleph1.co.uk/yaffs2
Install the git command first:
sudo apt-get install git
Method 2):
Enter
Http://www.aleph1.co.uk/gitweb?p=yaffs2.git;a=shortlog
Click:Snapshot
download this version below. (The latest version has a problem)
2014-06-18 Charles Manning Update to support Linux 3.14/3.15 Commit | commitdiff | tree | Snapshot
tar xvzf yaffs2-4e188b0.tar.gz-c/home/chris/temp
3. Porting the YAFFS2 file system
the so-called transplant transplant YAFFS2 file system is actually the Linux kernel that adds the YAFFS2 file system.
Adding a file system (or driver) to the kernel is generally divided into three steps:
1) Add source files to the kernel source (patching);
2) Modify kernel-related kconfig files to facilitate file system configuration;
3) Modify kernel related kbulid makefile file, compile YAFFS2 file system source directory into kernel;
YAFFS2 How to use:
CD Yaffs-dir
./patch-ker.sh C M Linux-tree
For example:
CD/HOME/CHRIS/TEMP/YAFFS2
./patch-ker.sh C m/home/chris/temp/linux-3.4.2
4. Configure the kernel:
│location: │
│-> File Systems │
│-> Miscellaneous filesystems (Misc_filesystems [=y])
│<*> YAFFS2 file system support ││
││-*-Byte/page Devices ││
││[] Use older-style on-nand data format with Pagestatus byte (NEW) ││
││[*] Lets yaffs does its own ECC ││
││[] Use the same ECC byte order as Steven Hill ' s nand_ecc.c (NEW) ││
││-*-2048 byte (or larger)/page devices ││
││[*] autoselect yaffs2 format (NEW) ││
││[] Disable yaffs from doing ECC in tags by default (NEW)
5. Compiling the kernel
Make zimage
FL2440 Transplant LINUX-3.4.2 (iv)--add support for Yaffs file system