Da:Cristian Cudizio <
cristian.cudizio@yahoo.it>
A:
yaffs@lists.aleph1.co.uk
Inviato: Lun 11 gennaio 2010, 09:32:08
Oggetto: Re: [Yaffs] Error compiling on yaffs_fs.c
Da:Charles Manning <
manningc2@actrix.gen.nz>
A:
yaffs@lists.aleph1.co.uk
Cc: Cristian Cudizio <
cristian.cudizio@yahoo.it>
Inviato: Lun 11 gennaio 2010, 00:41:47
Oggetto: Re: [Yaffs] Error compiling on yaffs_fs.c
On Saturday 09 January 2010 04:11:25 Cristian Cudizio wrote:
> Hi,
> i've downloaded via CVS yaffs2 sources on a Oracle Enterprise Linux 5U4
> (equal to RH 5U4)
>
> but i've this errors on compilation :
> include/linux/config.h:6:2: warning: #warning Including config.h is
....
> What i'm missing?
This will be due to some backporting messing up the conditional compilation.
Try changing this:
--- yaffs_fs.c~ 2010-01-11 12:39:36.000000000 +1300
+++ yaffs_fs.c 2010-01-11 12:39:36.000000000 +1300
@@ -151,7 +151,7 @@
/*#define T(x) printk x */
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18))
#define yaffs_InodeToObjectLV(iptr) ((iptr)->i_private)
#else
#define yaffs_InodeToObjectLV(iptr) ((iptr)->u.generic_ip)
There might be some other oddities too.
-- Charles
Thanks a lot, with that change i've got:
[oracle@oel54test11gR201 yaffs2]$ make clean
make -C /lib/modules/2.6.18-164.el5xen/build M=/home/oracle/yaffs/yaffs2 clean
..
make[2]: *** [/home/oracle/yaffs/yaffs2/yaffs_fs.o] Error 1
make[1]: *** [_module_/home/oracle/yaffs/yaffs2] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-x86_64'
make: *** [modules] Error 2
so, i've applyed this:
@@ -1063,7 +1063,7 @@ static void yaffs_FillInodeFromObject(st
inode->i_mode = obj->yst_mode;
inode->i_uid = obj->yst_uid;
inode->i_gid = obj->yst_gid;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
inode->i_blksize = inode->i_sb->s_blocksize;
#endif
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
And module compilation succeds, but i've this error on utils/ compilation:
[oracle@oel54test11gR201 utils]$ make
....
../yaffs_tagsvalidity.h:22: warning: redundant redeclaration of ‘yaffs_InitialiseTags’
../yaffs_guts.h:904: warning: previous declaration of ‘yaffs_InitialiseTags’ was here
mkyaffs2image.c: In function ‘write_chunk’:
mkyaffs2image.c:180: warning: passing argument 1 of ‘little_to_big_endian’ from incompatible pointer type
mkyaffs2image.c:185: warning: passing argument 1 of ‘yaffs_PackTags2’ from incompatible pointer type
mkyaffs2image.c:185: warning: passing argument 2 of ‘yaffs_PackTags2’ from incompatible pointer type
mkyaffs2image.c:185: error: too few arguments to function ‘yaffs_PackTags2’
make: *** [mkyaffs2image.o] Error 1
Regards,
Cristian
I've tryied with this :
--- mkyaffs2image.c 14 Feb 2007 01:09:06 -0000 1.4
+++ mkyaffs2image.c 11 Jan 2010 08:44:25 -0000
@@ -182,7 +182,7 @@ static int write_chunk(__u8 *data, __u32
nPages++;
- yaffs_PackTags2(&pt,&t);
+ yaffs_PackTags2TagsPart(&pt,&t);
// return write(outFile,&pt,sizeof(yaffs_PackedTags2));
return write(outFile,&pt,spareSize);
And now it compiles: is it correct?
Regards,
Cristian