[BusyBox] some uClibc bugs and success building e2fsprogs-1.18

Manuel Novoa III mnovoa3 at bellsouth.net
Tue Dec 5 16:48:33 UTC 2000


		
This is slightly off topic but since some people use busybox in
micro-distributions I thought I'd post it here.

I'm also looking for feedback from the uClibc maintainers regarding the issues
mentioned below.  Thanks.

I've managed to successfully build the base e2fsprogs-1.18 package with uClibc
for i386.  Compiling with -Os -fomit-frame-pointer, I get the following
stripped static executables.

-rwxrwxr-x    1 mjn3     mjn3        25628 Dec  5 10:32 badblocks
-rwxrwxr-x    1 mjn3     mjn3        26208 Dec  5 10:32 chattr
-rwxrwxr-x    1 mjn3     mjn3       101220 Dec  5 10:32 debugfs
-rwxrwxr-x    1 mjn3     mjn3        55052 Dec  5 10:32 dumpe2fs
-rwxrwxr-x    1 mjn3     mjn3       134000 Dec  5 10:32 e2fsck
-rwxrwxr-x    1 mjn3     mjn3        11288 Dec  5 10:32 e2label
-rwxrwxr-x    1 mjn3     mjn3        31880 Dec  5 10:32 fsck
-rwxrwxr-x    1 mjn3     mjn3        23664 Dec  5 10:32 lsattr
-rwxrwxr-x    1 mjn3     mjn3        76316 Dec  5 10:32 mke2fs
-rwxrwxr-x    1 mjn3     mjn3        11192 Dec  5 10:32 mklost+found
-rwxrwxr-x    1 mjn3     mjn3        49612 Dec  5 10:32 tune2fs
-rwxrwxr-x    1 mjn3     mjn3         9564 Dec  5 10:32 uuidgen

(Just a note: adding mke2fs (as is) to busybox would probably add about 44k.)

Also, I've put together a basic multicall version including all of the above
-rwxrwxr-x    1 mjn3     mjn3       226984 Dec  5 10:38 e2fsbox-all
and another omitting debugfs functionality.
-rwxrwxr-x    1 mjn3     mjn3       187152 Dec  5 10:38 e2fsbox
..
The e2fsprog "make check" step reports only 3 failures, but they are all the
result of differences in date representation: uClibc ctime reports dates as
"Month<space>0<digit>" while glibc reports them as
"Month<space><space><digit>".  According to the documentation I have, uClibc's
behavior is correct w.r.t. the standards.  Also, I've successfully run mke2fs.

Basically, the changes to e2fsprogs involved converting printing of doubles
(times), removing some name-space clashes for the multicall version, and
slightly modifying the configure process.  I still need to clean this up some,
but I should be able to post patches/instructions in the next couple of days.
Before I do though, there are some bugs/issues with uClibc which needed
addressing.

BUG:
The function fflush in stdio/stdio.c can be called before an
"Inline_init" is done.  Adding "Inline_init;" at the start of fflush also fixes
the same problem for the setbuf and setvbuf functions.

BUG/ISSUE:
There are some places where "long long"'s are printed.  uClibc didn't support
them, so I added support.  Is "long long" support a problem for any of the
uClibc target architectures? (NOTE: printf.c format string parsing really needs
to be cleaned up... %lld was being accepted as %ld without signalling an error.
 This is on my list.)

ISSUES:
I had to "#define __KERNEL_STRICT_NAMES" in "include/features.h".  This is also
done in glibc's version.

I added rudimentary support for the TZ environment variable to
misc/time/tm_conv.c in order to pass some of the "make check" tests since they
use TZ=GMT.  This support isn't large (I don't worry about daylight savings
time... I just use the offset given from TZ=XXX[+-]##XXX) but may not be
desired in uClibc.  Comments?

Basically everything defined in linux/stat.h is also defined in
include/sys/stat.h.  There is a test in linux/stat.h to avoid this if using
glibc.  I removed the include in the few e2fsprogs files where it was a
problem, but I think a more general solution should be found to avoid problems
with other packages. (note: I'm using kernel 2.2.17).







More information about the busybox mailing list