Porting the YAFFS2 file system to the linux3.18.4 kernel (original)

Source: Internet
Author: User
Tags git clone

Porting Yaffs File system: (linux-3.18.4 Kernel) 1.git clone GIT://WWW.ALEPH1.CO.UK/YAFFS2//Use this to get YAFFS2 source Package 1.1 Decompression Source Package 2. Patch CD Yaffs-dir
./patch-ker.sh C m linux-tree such as./patch-ker.sh C m/home/fedora/workspace/linux-3.18.4 3. Configuring Kernel Support Yaffs
File Systems |
| Miscellaneous filesystems (Misc_filesystems [=y]) |
| YAFFS2 File system Support (Yaffs_fs [=n]) |
| Byte/page devices (YAFFS_YAFFS1 [=n]) |
| Use Older-style on-nand data format with Pagestatus byte selected, using default values
4. Compile, use zimage make arch=arm cross_compile=arm-linux-zimage compile error:

fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_file_flush ':
Fs/yaffs2/yaffs_vfs.c:741:error:too few arguments to function ' yaffs_flush_file '
fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_sync_object ':
Fs/yaffs2/yaffs_vfs.c:771:error:too few arguments to function ' yaffs_flush_file '
Fs/yaffs2/yaffs_vfs.c:at Top level:
Fs/yaffs2/yaffs_vfs.c:781:error: ' Generic_file_aio_read ' undeclared here (not in a function)
Fs/yaffs2/yaffs_vfs.c:782:error: ' Generic_file_aio_write ' undeclared here (not in a function)
Fs/yaffs2/yaffs_vfs.c:787:error: ' Generic_file_splice_write ' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c:in function ' yaffs_flush_inodes ':
Fs/yaffs2/yaffs_vfs.c:2190:error:too few arguments to function ' yaffs_flush_file '
fs/yaffs2/yaffs_vfs.c:in function ' Yaffs_flush_super ':
Fs/yaffs2/yaffs_vfs.c:2203:error:too few arguments to function ' Yaffs_flush_whole_cache '

The code is modified as follows:

Diff--git A/yaffs_vfs.c B/YAFFS_VFS.C
Index 76BC1DB: F6E4EC2 100755
---a/yaffs_vfs.c
+ + B/YAFFS_VFS.C
@@ -738,7 +738,7 @@ -738,7 int yaffs_file_flush (struct file *file)

Yaffs_gross_lock (Dev);

-yaffs_flush_file (obj, 1, 0);
+yaffs_flush_file (obj, 1, 0, 1);

Yaffs_gross_unlock (Dev);

@@ -768,7 +768,7 @@ -768,7 int yaffs_sync_object (struct file *file, struct dentry *dentry,
Yaffs_trace (Yaffs_trace_os | Yaffs_trace_sync,
"Yaffs_sync_object");
Yaffs_gross_lock (Dev);
-yaffs_flush_file (obj, 1, datasync);
+yaffs_flush_file (obj, 1, datasync, 1);
Yaffs_gross_unlock (Dev);
return 0;
}
@@ -778,13 +778,13 @@ -778,13 int yaffs_sync_object (struct file *file, struct dentry *dentry,
static const struct File_operations yaffs_file_operations = {
. Read = Do_sync_read,
. write = Do_sync_write,
-.aio_read = Generic_file_aio_read,
-.aio_write = Generic_file_aio_write,
+. Read_iter =generic_file_read_iter,
+. Write_iter =generic_file_write_iter,
. mmap = Generic_file_mmap,
. Flush = Yaffs_file_flush,
. Fsync = Yaffs_sync_object,
-.splice_read = Generic_file_splice_read,
-.splice_write = Generic_file_splice_write,
+.splice_read =generic_file_splice_read,
+.splice_write= Iter_file_splice_write,
. Llseek = Generic_file_llseek,
};

@@ -2187,7 +2187,7 @@ -2187,7 void yaffs_flush_inodes (struct super_block *sb)
Yaffs_trace (Yaffs_trace_os,
"Flushing obj%d",
OBJ->OBJ_ID);
-yaffs_flush_file (obj, 1, 0);
+yaffs_flush_file (obj, 1, 0, 1);
}
}
}
@@ -2200,7 +2200,7 @@ -2200,7 void yaffs_flush_super (struct super_block *sb, int do_checkpoint)

Yaffs_flush_inodes (SB);
Yaffs_update_dirty_dirs (Dev);
-yaffs_flush_whole_cache (Dev);
+yaffs_flush_whole_cache (Dev, 1);
if (do_checkpoint)
Yaffs_checkpoint_save (Dev);
}

Recompile:

CHK Include/config/kernel.release
CHK Include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
MAKE[1]: "Include/generated/mach-types.h" is up to date.
Call scripts/checksyscalls.sh
CHK include/generated/compile.h
CC FS/YAFFS2/YAFFS_VFS.O
CC FS/YAFFS2/YAFFS_GUTS.O
CC FS/YAFFS2/YAFFS_CHECKPTRW.O
CC FS/YAFFS2/YAFFS_PACKEDTAGS1.O
CC FS/YAFFS2/YAFFS_PACKEDTAGS2.O
CC FS/YAFFS2/YAFFS_NAND.O
CC FS/YAFFS2/YAFFS_TAGSCOMPAT.O
CC FS/YAFFS2/YAFFS_TAGSMARSHALL.O
CC FS/YAFFS2/YAFFS_MTDIF.O
CC FS/YAFFS2/YAFFS_NAMEVAL.O
CC FS/YAFFS2/YAFFS_ATTRIBS.O
CC FS/YAFFS2/YAFFS_ALLOCATOR.O
CC FS/YAFFS2/YAFFS_YAFFS1.O
CC FS/YAFFS2/YAFFS_YAFFS2.O
CC FS/YAFFS2/YAFFS_BITMAP.O
CC FS/YAFFS2/YAFFS_SUMMARY.O
CC FS/YAFFS2/YAFFS_VERIFY.O
LD FS/YAFFS2/YAFFS.O
LD FS/YAFFS2/BUILT-IN.O
LD FS/BUILT-IN.O
LINK Vmlinux
LD VMLINUX.O
Modpost VMLINUX.O
GEN. Version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC INIT/VERSION.O
LD INIT/BUILT-IN.O
Ksym. tmp_kallsyms1.o
Ksym. tmp_kallsyms2.o
LD Vmlinux
SORTEX Vmlinux
Sysmap System.map
Objcopy Arch/arm/boot/image
Kernel:arch/arm/boot/image is ready
GZIP Arch/arm/boot/compressed/piggy.gzip
As ARCH/ARM/BOOT/COMPRESSED/PIGGY.GZIP.O
LD Arch/arm/boot/compressed/vmlinux
Objcopy Arch/arm/boot/zimage
Kernel:arch/arm/boot/zimage is ready

Ok!

Porting the YAFFS2 file system to the linux3.18.4 kernel (original)

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.