busybox e2fsprogs on powerpc
Ken McGuire
kenm at desertweyr.com
Mon Jan 23 17:37:36 UTC 2006
On 23 Jan 2006 at 9:56, Ken McGuire wrote:
> On 23 Jan 2006 at 10:03, Rob Landley wrote:
>
> I'll give it a look, no guarantees, the patches may be ugly(tm).
>
> (<ken>Cross compiling is easy with buildroot!</ken>)
>
>
Well Rob, here is a patch, about as ugly as yours, but it now builds a
filesystem that is not byte-swapped. Seems to work, and both bb's fsck and
e2fsprogs-1.38 fsck likes it too.
...ken...
-------------- Enclosure number 1 ----------------
diff -urN ../e2fsprogs.orig/Makefile.in e2fsprogs/Makefile.in
--- ../e2fsprogs.orig/Makefile.in 2006-01-10 22:44:12.000000000 -0700
+++ e2fsprogs/Makefile.in 2006-01-23 08:17:30.000000000 -0700
@@ -30,7 +30,7 @@
bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \
dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \
dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \
- ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c
+ ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c swapfs.c native.c
EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
diff -urN ../e2fsprogs.orig/e2fsbb.h e2fsprogs/e2fsbb.h
--- ../e2fsprogs.orig/e2fsbb.h 2006-01-10 22:44:12.000000000 -0700
+++ e2fsprogs/e2fsbb.h 2006-01-23 10:12:36.000000000 -0700
@@ -53,5 +53,9 @@
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
+#if __BYTE_ORDER== __BIG_ENDIAN
+#define ENABLE_SWAPFS 1
+#define WORDS_BIGENDIAN 1
+#endif
#endif /* __E2FSBB_H__ */
diff -urN ../e2fsprogs.orig/ext2fs/ext2fs.h e2fsprogs/ext2fs/ext2fs.h
--- ../e2fsprogs.orig/ext2fs/ext2fs.h 2006-01-10 22:44:12.000000000 -0700
+++ e2fsprogs/ext2fs/ext2fs.h 2006-01-23 08:03:21.000000000 -0700
@@ -34,7 +34,8 @@
* has been configured or if we're being built on a CPU architecture
* with a non-native byte order.
*/
-#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)
+//#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)
+#if defined(ENABLE_SWAPFS) || defined(WORDS_BIGENDIAN)|| __BYTE_ORDER== __BIG_ENDIAN
#define EXT2FS_ENABLE_SWAPFS
#endif
More information about the busybox
mailing list