Greetings,
I am trying to get yaffs compiled under linux-2.6.29-rc3-git5 for
openwrt/mipsel using gcc-4.3.3, uclibc-0.9.30 and binutils-2.19
here is a patch that fixes some issues:
--- linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c.orig 2009-02-03 20:10:33.000000000 +0200
+++ linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c 2009-02-03 19:36:18.000000000 +0200
@@ -1234,8 +1234,14 @@
yaffs_Object *parent = yaffs_InodeToObject(dir);
int error = -ENOSPC;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
uid_t uid = current->fsuid;
gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
+#else /* 2.6.29 and higher */
+ uid_t uid = current->cred->fsuid;
+ gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid :
current->cred->fsgid;
+#endif /* 2.6.29 check */
if((dir->i_mode & S_ISGID) && S_ISDIR(mode))
mode |= S_ISGID;
@@ -1414,8 +1420,14 @@
{
yaffs_Object *obj;
yaffs_Device *dev;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
uid_t uid = current->fsuid;
gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
+#else /* 2.6.29 and higher */
+ uid_t uid = current->cred->fsuid;
+ gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid :
current->cred->fsgid;
+#endif /* 2.6.29 check */
T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_symlink\n"));
the linker though produces the following error:
fs/built-in.o: In function `yaffs_internal_read_super':
yaffs_fs.c:(.text.yaffs_internal_read_super+0x7c8): undefined reference
to `__udivdi3'
yaffs_fs.c:(.text.yaffs_internal_read_super+0x7c8): relocation truncated
to fit: R_MIPS_26 against `__udivdi3'
make[5]: *** [vmlinux] Error 1
make[5]: Leaving directory
`/develop/openwrt/rb532/trunk/build_dir/linux-rb532/linux-2.6.29-rc3'
make[4]: ***
[/develop/openwrt/rb532/trunk/build_dir/linux-rb532/linux-2.6.29-rc3/.image]
Error 2
make[4]: Leaving directory `/develop/openwrt/rb532/trunk/target/linux/rb532'
best regards,
--
Alexandros C. Couloumbis
http://dev.ozo.com/