I have a system which works for simple programs. I haven't tested
mmap, statfs etc.
I use Matti Aarnio's patch available from
Fetch ftp://mea.tmt.tele.fi/linux/LFS/
with the modification that I use the following stat64 structure (in
linux/include/asm-i386/stat.h). The kernel and glibc have
incompatible structures and instead of translating, I changed the
kernel structure:
struct stat64 {
unsigned long long st_dev;
unsigned short __pad1;
unsigned long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned int st_uid;
unsigned int st_gid;
unsigned long long st_rdev;
unsigned short __pad2;
unsigned long long st_size;
unsigned long st_blksize;
unsigned long long st_blocks;
unsigned long st_atime;
unsigned long __unused1;
unsigned long st_mtime;
unsigned long __unused2;
unsigned long st_ctime;
unsigned long __unused3;
unsigned long __unused4;
unsigned long __unused5;
};
Then, you have to use glibc-2.1 (available from cygnus). I use the
following one-liner to get stat64 working:
diff -ur glibc-2.1/sysdeps/unix/sysv/linux/xstat64.c glibc-2.1-test/sysdeps/unix
/sysv/linux/xstat64.c
--- glibc-2.1/sysdeps/unix/sysv/linux/xstat64.c Tue Oct 20 20:14:15 1998
+++ glibc-2.1-test/sysdeps/unix/sysv/linux/xstat64.c Sat Feb 13 00:44:40 1999
@@ -36,7 +36,7 @@
struct kernel_stat kbuf;
int result;
- result = INLINE_SYSCALL (stat, 2, name, &kbuf);
+ result = INLINE_SYSCALL (stat64, 2, name, &kbuf);
if (result == 0)
result = xstat64_conv (vers, &kbuf, buf);
More patches to glibc are needed for the rest of the system calls, but
the above should get you going.
Compile as usual on a LSF system (-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64).
Remember to make your ext2-filesystem with a block-size larger than 1k
(which is the default)! 4k should suffice for most applications, but
check the documentation in the LFS patch.
astor
-- Alexander Kjeldaas, Fast Search & Transfer, Trondheim, Norway- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/