Editor: We didn't port the yaffs2 file system here, but just patch the kernel to support the yaffs2 file system.
1. Obtain the source code of yaffs2
Currently, most development boards support the yaffs2 file system. It is a file system specially designed for embedded devices, especially the embedded devices that use NAND Flash as memory, earlier yaffs only supported NAND Flash with small pages (512 byte/page). Most of the current development boards are equipped with larger volumes of NAND Flash, generally, they are in the big page mode (2 k/page). You can use yaffs2 to support the large page NAND Flash. The following is a detailed step for porting yaffs2.
InHttp://www.yaffs.net/node/346You can download the latest yaffs2Source codeTo use the GIT tool, enter the following in the command line:
# Git clone git: // www. aleph1.co. uk/yaffs2
Wait a moment to download the latest yaffs2 source.CodeDirectory, the CD also has a separate yaffs2 source package (File Name: yaffs2-src-20100329.tar.gz)
2. patch the kernel with yaffs2
Then go to the yaffs2 source code directory and execute:
# Cd yaffs2
#./Patch-ker.sh C/opt/friendlyarm/mini2440/linux-2.6.32.2
Now go to the linux-2.6.32.2/fs directory, you can see that there is an additional yaffs2 directory.
3. Configure and compile the kernel with yaffs2 support
Run make menuconfig in the root directory of the Linux kernel source code, move the upper and lower buttons to find file systems, press enter to enter the sub menu, then find the "Miscellaneous filesystems" menu item, and press enter to enter the sub menu,Find "yaffs2 file system support" and select it by space. In this way, we have added support for the yaffs2 File System in the kernel, and press "exit" to exit the Kernel configuration.
Run the following command on the command line:
# Make zimage
4. Run the test on the Development Board.
Finally, the linux-2.6.32.2/ARCH/ARM/boot/zimage will be generated, use the supervivi "K" function to burn it to the NAND Flash, press "B" to start the system, then, if NAND Flash already has a file system (you can use the supervivi's "Y" feature to burn out the ready-made yaffs2 file system image root_qtopia-128M.img provided by the friendly arm for testing ).