Yaffs Transplantation of linux3.6.5 __linux

Source: Internet
Author: User
1, download the source code.

Enter the Urdir directory (for description convenience, the Yaffs file is downloaded to the Urdir directory, the kernel source directory is urdir/linux3.6.5).

If the system has already installed the Git tool, execute directly:

Git clonegit://www.aleph1. CO.UK/YAFFS2 (@qingwu: Git is generally supported under the terminal)

If there is no Git tool, first download and install Git (http://git-scm.com/, if under Fedora, can be directly yum installed, command: Yum installgit.i686). of course, you can also download the Git tool under Windows (Please note: Windows files may appear in the error of carriage return line, such as ^m can not recognize, etc., you may refer to:

http://blog.csdn.net/cocoxiaomei/article/details/8497929)

2, to the core to make patches

After downloading the yaffs source code, enter the Urdir/yaffs source code directory and execute:

#. /patch-kernel.sh c M.. /linux-3.6.5

According to the help documentation, you know what C M means (you wish to copy (c) or link (l) the code and the path to your kernel sources and whether youwant to use  The Single-version or multi-version code.) 3, into the kernel source directory, configure the kernel, command: [root@localhostlinux-3.6.5] #make menuconfig, into the kernel configuration interface.

File Systems--->

[*] Miscellaneous filesystems---> <*> yaffs2 file system support

If there are no yaffs configuration options found in the file system configuration interface, Workaround:

In the configuration interface, look for/yaffs and find the illustration:


where the parameter in [] is the current state of the corresponding option, the YAFFS_FS option is [y], dependent on misc_filesystems and mtd_block for [y], but the latter is currently in [n], so it needs to be selected as [y]. Please configure it yourself.

4 If here direct make , the following sequence of errors occurs, and the resolution is given in the wrong corresponding row.

The file directories mentioned need to be modified are:

[Root@localhost linux-3.6.5]# vim include/linux/fs.h [root@localhost linux-3.6.5]# vim FS/YAFFS2/YAFFS_VFS.C [ Root@localhost linux-3.6.5]# Vim FS/YAFFS2/YAFFS_MTDIF.C

Note: The solution to this article is reproduced, the original link:

http://blog.csdn.net/longtian635241/article/details/8259107


Fs/yaffs2/yaffs_vfs.c:438:warning:initialization from incompatible pointer type
Fs/yaffs2/yaffs_vfs.c:439:warning:initialization from incompatible pointer type
Fs/yaffs2/yaffs_vfs.c:443:warning:initialization from incompatible pointer type
Fs/yaffs2/yaffs_vfs.c:445:warning:initialization from incompatible pointer type
Fs/yaffs2/yaffs_vfs.c:478:error:unknown field ' Write_super ' specified in initializer--add void (*write_super) (struct Super_block *) in the struct super_operations in fs.h;
Fs/yaffs2/yaffs_vfs.c:478:warning:initialization from incompatible pointer type
fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_evict_inode ': FS/YAFFS2/YAFFS_VFS.C:873:error:implicit declaration of function ' End_writeback '--This function was changed to Clear_inode
Fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_do_sync_fs ':
Fs/yaffs2/yaffs_vfs.C:2203:error: ' struct Super_block ' has no member named ' S_dirt ' Fs/yaffs2/yaffs_vfs.C:2214:error: ' struct Super_block ' has no member named ' S_dirt ' Fs/yaffs2/yaffs_vfs.C:2216:error: ' struct Super_block ' has no member named ' S_dirt '--Add unsigned char s_dirt to the fs.h struct super_block;
Fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_put_super ':
Fs/yaffs2/yaffs_vfs.C:2506:error: ' struct mtd_info ' has no member named ' Sync '--all errors in the mtd_info are underlined in front of the parametersFs/yaffs2/yaffs_vfs.C:2507:error: ' struct mtd_info ' has no member named ' Sync '--Example: Mtd->sync changed to Mtd->_sync
Fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_touch_super ':
Fs/yaffs2/yaffs_vfs.C:2523:error: ' struct Super_block ' has no member named ' S_dirt '
Fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_internal_read_super ':
Fs/yaffs2/yaffs_vfs.C:2699:error: ' struct mtd_info ' has no member named ' Erase '
Fs/yaffs2/yaffs_vfs.C:2700:error: ' struct mtd_info ' has no member named ' Read '
Fs/yaffs2/yaffs_vfs.C:2701:error: ' struct mtd_info ' has no member named ' Write '
Fs/yaffs2/yaffs_vfs.C:2702:error: ' struct mtd_info ' has no member named ' Read_oob '
Fs/yaffs2/yaffs_vfs.C:2703:error: ' struct mtd_info ' has no member named ' Write_oob '
Fs/yaffs2/yaffs_vfs.C:2704:error: ' struct mtd_info ' has no member named ' Block_isbad '
Fs/yaffs2/yaffs_vfs.C:2705:error: ' struct mtd_info ' has no member named ' Block_markbad '
Fs/yaffs2/yaffs_vfs.C:2729:error: ' struct mtd_info ' has no member named ' Erase '
Fs/yaffs2/yaffs_vfs.C:2730:error: ' struct mtd_info ' has no member named ' Block_isbad '
Fs/yaffs2/yaffs_vfs.C:2731:error: ' struct mtd_info ' has no member named ' Block_markbad '
Fs/yaffs2/yaffs_vfs.C:2731:error: ' struct mtd_info ' has no member named ' Read '
Fs/yaffs2/yaffs_vfs.C:2731:error: ' struct mtd_info ' has no member named ' Write '
Fs/yaffs2/yaffs_vfs.C:2733:error: ' struct mtd_info ' has no member named ' Read_oob '
Fs/yaffs2/yaffs_vfs.C:2733:error: ' struct mtd_info ' has no member named ' Write_oob '
Fs/yaffs2/yaffs_vfs.C:2754:error: ' struct mtd_info ' has no member named ' Erase '
Fs/yaffs2/yaffs_vfs.C:2754:error: ' struct mtd_info ' has no member named ' Read '
Fs/yaffs2/yaffs_vfs.C:2754:error: ' struct mtd_info ' has no member named ' Write '
Fs/yaffs2/yaffs_vfs.C:2756:error: ' struct mtd_info ' has no member named ' Read_oob '
Fs/yaffs2/yaffs_vfs.C:2756:error: ' struct mtd_info ' has no member named ' Write_oob ' Fs/yaffs2/yaffs_vfs.C:2946:error:implicit declaration of function ' D_alloc_root '--This function is changed to D_make_rootFs/yaffs2/yaffs_vfs.C:2946:warning:assignment makes pointer from integer without a cast FS/YAFFS2/YAFFS_VFS.C:2955:error: ' struct Super_block ' has no member named ' S_dirt '
MAKE[2]: * * * * [FS/YAFFS2/YAFFS_VFS.O] Error 1
MAKE[1]: * * * [FS/YAFFS2] Error 2

fs/yaffs2/yaffs_mtdif.c:in function ' Nandmtd_erase_block ':
Fs/yaffs2/yaffs_mtdif.c:53:error: ' struct mtd_info ' has no member named ' Erase '
fs/yaffs2/yaffs_mtdif.c:in function ' Yaffs_mtd_write ':
Fs/yaffs2/yaffs_mtdif.c:79:error: ' struct mtd_info ' has no member named ' Write_oob '
fs/yaffs2/yaffs_mtdif.c:in function ' Yaffs_mtd_read ':
Fs/yaffs2/yaffs_mtdif.c:115:error: ' struct mtd_info ' has no member named ' Read_oob '
fs/yaffs2/yaffs_mtdif.c:in function ' yaffs_mtd_erase ':
Fs/yaffs2/yaffs_mtdif.c:168:error: ' struct mtd_info ' has no member named ' Erase '
fs/yaffs2/yaffs_mtdif.c:in function ' Yaffs_mtd_mark_bad ':
Fs/yaffs2/yaffs_mtdif.c:184:error: ' struct mtd_info ' has no member named ' Block_markbad '
fs/yaffs2/yaffs_mtdif.c:in function ' Yaffs_mtd_check_bad ':
Fs/yaffs2/yaffs_mtdif.c:196:error: ' struct mtd_info ' has no member named ' Block_isbad '
MAKE[2]: * * * [FS/YAFFS2/YAFFS_MTDIF.O] Error 1
MAKE[1]: * * * [FS/YAFFS2] Error 2
Make: * * * [FS] Error 2

5, modified to complete, in the source directory make can be. [Root@localhost linux-3.6.5]# make the rest of the work is to burn to the Development Board to write the kernel.

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.