Hi all,

    we had a problem compiling the linux kernel using for an 
arm big endian target in the qemu-armeb environment. 

The compilation  stopped when executing the split-include utility during 
the kernel compilation phase: split-include exited with an error of the 
stat64 syscall, executed in the environment emulated by qemu. 

Qemu seemed to ignore the fact that in big endian systems the fields 
st_blocks and its padding are swapped (to allow future expansion of the 
field,) so the fix consisted only in swapping the two fields (only in big 
endian systems, of course.)

The attached patch  should fix the problem.

Regards,

            Michael, Fabio and Claudio

diff -ur qemu-0.8.1.orig/linux-user/syscall_defs.h 
qemu-0.8.1/linux-user/syscall_defs.h
--- qemu-0.8.1.orig/linux-user/syscall_defs.h   2006-09-07 21:49:22.000000000 
+0000
+++ qemu-0.8.1/linux-user/syscall_defs.h        2006-09-07 21:51:10.000000000 
+0000
@@ -914,8 +914,13 @@
        long long       st_size;
        target_ulong    st_blksize;
 
+#ifndef TARGET_WORDS_BIGENDIAN
        target_ulong    st_blocks;      /* Number 512-byte blocks allocated. */
        target_ulong    __pad4;         /* future possible st_blocks high bits 
*/
+#else
+       target_ulong    __pad4;         /* future possible st_blocks high bits 
*/
+       target_ulong    st_blocks;      /* Number 512-byte blocks allocated. */
+#endif
 
        target_ulong    target_st_atime;
        target_ulong    __pad5;
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to