1) download the yaffs file system code. Download URL:
Http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/
Click Download tarball in the lower-left corner of the page to download all relevant code. You can also download
|
| File: |
Yaffs2.tar.gz |
| Size: |
110kb |
| Download: |
Download |
|
Of course, if your NAND Flash is only 512 + 16 B, you can only port yaffs, because even if you port yaffs2, it will automatically choose to mount yaffs1.
# Cd/Public
# Tar zxf yaffs2.tar.gz
The source code of yaffs2 is under the/public/yaff2/directory.
(2) create a yaffs2 folder under the kernel directory to be transplanted and copy the required files:
# Cd/public/linux-2.6.11.7-2410/
# Cd FS
# Mkdir yaffs2
# Cd yaffs2
# Cp/public/yaffs2/*. h.
# Cp/public/yaffs2/*. C.
# Cp/public/yaffs2/makefile-kernel makefile
# Cp/public/yaffs2/kconfig.
(3) modify the/public/linux-2.6.11.7-2410/fs/makefile and kconfig file.
# Cd/public/linux-2.6.11.7-2410/fs/
# Vi makefile (Add the following line to makefile)
OBJ-$ (config_yaffs_fs) + = yaffs2/
# Vi kconfig (Add the following line to kconfig)
Source "FS/yaffs2/kconfig
(4) CD/public/linux-2.6.11.7-2410/
Make menuconfig
When compiling the kernel, select:
<*> Yaffs2 File System Support
<*> 512 byte/Page Devices
<*> Lets yaffs do its own
ECC
<*> 2048 byte (or larger)/Page Devices
<*> Autoselect yaffs2 format
<*> Disable lazy loading
<*> Turn off wide tnodes
<*> Turn off debug chunk erase check
(5) Compile the kernel make zimage
It seems that some people have encountered problems during compilation on the Internet. I have not encountered any problems and it is very smooth.
By the way: a problem occurs during the compilation of yaffs and the compilation fails. This is also a major reason why I chose yaff2 instead of yaffs.
(6) The kernel running on the board is 2.4. Replace the root file system on the board with the yaffs file system. For detailed procedures, see the document.
Then in vivi> param set linux_cmd_line "noinitrd root =/dev/mtdblock/3 init =/linuxrc console = ttysac0"
Modify the startup parameters and then burn the generated 2.6 kernel.
(7) The instance is successfully started.