Port yaffs2 to kernel linux2.6.38

Source: Internet
Author: User

 

The following error occurs when Linux 2.6.38 kernel is transplanted.

VFS: cannot open root device "mtdblock2" or unknown-block (31,2)

Please append a correct "root =" Boot option; here are the available partitions:

1f00 512 mtdblock0 (driver ?)

1f01 5120 mtdblock1 (driver ?)

1f02 256512 mtdblock2 (driver ?)

Kernel panic-not syncing: VFS: unable tomount root FS on unknown-block (31,2)

Check the print information and confirm that the nandflash device is up and partitioned. The storage device is excluded. Suddenly, the kernel does not support the yaffs2 file system, so you have to manually add it, enable the kernel to support the yaffs2 file system.

1. Download the source code of yaffs2 from the Internet

2. decompress the package and enter the source code root directory. Execute the following command;

\ Shpatch-ker.sh C/work/89c6410/kernel/linux-2.6.38.5/

Note:/work/89c6410/kernel/linux-2.6.38.5/is the kernel directory

3. Configure the kernel and support yaffs2

Filesystems --->

[*] Miscellaneous filesystems --->

<*> Yaffs2 File System Support

In addition, the options below should also be selected. Do you want to renew the options above?

<*> Caching block Device Access to mtddevices

 

Question 1:

A problem occurs during compilation:

FS/yaffs2/yaffs_fs.c: 275: Warning: initialization from incompatible pointer type

FS/yaffs2/yaffs_fs.c: 334: Warning: initialization from incompatible pointer type

FS/yaffs2/yaffs_fs.c: 347: Error: unknownfield 'delete _ inode' specified in initializer

FS/yaffs2/yaffs_fs.c: 347: Warning: initialization from incompatible pointer type

FS/yaffs2/yaffs_fs.c: 348: Error: unknownfield 'clear _ inode 'specified in initializer

FS/yaffs2/yaffs_fs.c: 348: Warning: initialization from incompatible pointer type

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ delete_inode ':

FS/yaffs2/yaffs_fs.c: 563: Error: implicitdeclaration of function 'clear _ inode'

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ write_begin ':

FS/yaffs2/yaffs_fs.c: 748: Error: implicitdeclaration of function '_ grab_cache_page'

FS/yaffs2/yaffs_fs.c: 748: Warning: Assignment makes pointer from integer without a cast

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ mknod ':

FS/yaffs2/yaffs_fs.c: 1236: Error: 'Task task _ struct 'has no member named 'fsuid'

FS/yaffs2/yaffs_fs.c: 1237: Error: 'Task task _ struct 'has no member named 'fsgid'

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ symlink ':

FS/yaffs2/yaffs_fs.c: 1416: Error: 'Task task _ struct 'has no member named 'fsuid'

FS/yaffs2/yaffs_fs.c: 1417: Error: 'Task task _ struct 'has no member named 'fsgid'

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ setattr ':

FS/yaffs2/yaffs_fs.c: 1541: Error: implicitdeclaration of function 'inode _ setattr'

FS/yaffs2/yaffs_fs.c: In function 'yaffs _ internal_read_super ':

FS/yaffs2/yaffs_fs.c: 1957: Warning: format' % d' expects type 'int', but Argument 2 has type 'uint64 _ t'

FS/yaffs2/yaffs_fs.c: 2123: Error: implicitdeclaration of function 'init _ mutex'

 

Cause:

The Linux version is not compatible with the yaffs2 version. Download or patch the new version of yaffs2.

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.