Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/btree.o
CC [M] /opt/compile/compile/emmcfs_mod/bnode.o
CC [M] /opt/compile/compile/emmcfs_mod/cattree.o
CC [M] /opt/compile/compile/emmcfs_mod/file.o
CC [M] /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_setattr?:
/opt/compile/compile/emmcfs_mod/inode.c:1679: error: implicit declaration of function ?generic_setattr?
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_file_fsync?:
/opt/compile/compile/emmcfs_mod/inode.c:2297: error: implicit declaration of function ?generic_file_fsync?
/opt/compile/compile/emmcfs_mod/inode.c: At top level:
/opt/compile/compile/emmcfs_mod/inode.c:2324: warning: initialization from incompatible pointer type
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_new_inode?:
/opt/compile/compile/emmcfs_mod/inode.c:2380: error: implicit declaration of function ?inode_init_owner?
make[2]: *** [/opt/compile/compile/emmcfs_mod/inode.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
3. Now patched out all #if statements for kernel version in fs.h, no help either...
Code: Select all
#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 35) -> #if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 32)
4. neither generic_setattr nor generic_file_fsync are not defined in include/linux/fs.h, so edited my desktops include/linux/fs.h and added obove the #CONFIG_MIGRATION:
Code: Select all
extern int generic_file_fsync(struct file *, int);
extern void generic_setattr(struct inode *inode, const struct iattr *attr);
Still errors, but few errors already less:
Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/btree.o
CC [M] /opt/compile/compile/emmcfs_mod/bnode.o
CC [M] /opt/compile/compile/emmcfs_mod/cattree.o
CC [M] /opt/compile/compile/emmcfs_mod/file.o
CC [M] /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_new_inode?:
/opt/compile/compile/emmcfs_mod/inode.c:2384: error: implicit declaration of function ?inode_init_owner?
make[2]: *** [/opt/compile/compile/emmcfs_mod/inode.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
5. Okey, next patch:
Code: Select all
extern void inode_init_owner(struct inode *inode, const struct inode *dir,
mode_t mode);
and next error:
Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/btree.o
CC [M] /opt/compile/compile/emmcfs_mod/bnode.o
CC [M] /opt/compile/compile/emmcfs_mod/cattree.o
CC [M] /opt/compile/compile/emmcfs_mod/file.o
CC [M] /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
CC [M] /opt/compile/compile/emmcfs_mod/options.o
CC [M] /opt/compile/compile/emmcfs_mod/super.o
/opt/compile/compile/emmcfs_mod/super.c:29:29: error: linux/emmcfs_fs.h: No such file or directory
/opt/compile/compile/emmcfs_mod/super.c:499: error: implicit declaration of function ?BUILD_EMMCFS_BUG?
/opt/compile/compile/emmcfs_mod/super.c:499: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:499: error: (near initialization for ?emmcfs_sops.remount_fs?)
/opt/compile/compile/emmcfs_mod/super.c:499: error: expected ?}? before ?;? token
/opt/compile/compile/emmcfs_mod/super.c:1593: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:1593: error: (near initialization for ?emmcfs_fs_type.fs_flags?)
/opt/compile/compile/emmcfs_mod/super.c:1593: error: expected ?}? before ?;? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/super.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
6. corrected includes in super.c to use included emmcfs_fs.h file instead of one from kernel tree. Now new errors:
Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/btree.o
CC [M] /opt/compile/compile/emmcfs_mod/bnode.o
CC [M] /opt/compile/compile/emmcfs_mod/cattree.o
CC [M] /opt/compile/compile/emmcfs_mod/file.o
CC [M] /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
CC [M] /opt/compile/compile/emmcfs_mod/options.o
CC [M] /opt/compile/compile/emmcfs_mod/super.o
/opt/compile/compile/emmcfs_mod/super.c:499: error: implicit declaration of function ?BUILD_EMMCFS_BUG?
/opt/compile/compile/emmcfs_mod/super.c:499: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:499: error: (near initialization for ?emmcfs_sops.remount_fs?)
/opt/compile/compile/emmcfs_mod/super.c:499: error: expected ?}? before ?;? token
/opt/compile/compile/emmcfs_mod/super.c:1593: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:1593: error: (near initialization for ?emmcfs_fs_type.fs_flags?)
/opt/compile/compile/emmcfs_mod/super.c:1593: error: expected ?}? before ?;? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/super.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
7. Removing all #if statements for kernel version in file super.c. Ending with new issues:
Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/btree.o
CC [M] /opt/compile/compile/emmcfs_mod/bnode.o
CC [M] /opt/compile/compile/emmcfs_mod/cattree.o
CC [M] /opt/compile/compile/emmcfs_mod/file.o
CC [M] /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
CC [M] /opt/compile/compile/emmcfs_mod/options.o
CC [M] /opt/compile/compile/emmcfs_mod/super.o
CC [M] /opt/compile/compile/emmcfs_mod/fsm.o
CC [M] /opt/compile/compile/emmcfs_mod/fsm_btree.o
CC [M] /opt/compile/compile/emmcfs_mod/extents.o
/opt/compile/compile/emmcfs_mod/extents.c:321: error: expected identifier or ?(? before ?if?
/opt/compile/compile/emmcfs_mod/extents.c:323: error: expected identifier or ?(? before ?return?
/opt/compile/compile/emmcfs_mod/extents.c:324: error: expected identifier or ?(? before ?}? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/extents.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
8. Removing all #if statements for kernel version in file data.c. Still failed...
Code: Select all
make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
CC [M] /opt/compile/compile/emmcfs_mod/data.o
/opt/compile/compile/emmcfs_mod/data.c: In function ?emmcfs_write_snapshot_pages?:
/opt/compile/compile/emmcfs_mod/data.c:240: error: implicit declaration of function ?IS_ERR_OR_NULL?
make[2]: *** [/opt/compile/compile/emmcfs_mod/data.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
9. added IS_ERR_OR_NULL to include/linux/err.h
Code: Select all
static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
{
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}