busybox and mkfs.xfs

Michael Hunold hunold at linuxtv.org
Thu Jul 13 02:24:01 PDT 2006


Hi all,

some time ago I integrated mkfs.xfs version 2.6.17 from xfsprogs into
busybox 1.1.2.

It's a straight forward integration: only the source files necessary are
compiled and main() was renamed to mkfs_xfs_main(). No changes were done
to the source code. Due to this, the "patch" is 4574866(!) bytes.

Here are the results for my local busybox configuration, using gcc 4.0.3
cross toolchain on MIPS.

- busybox static (no xfs): 253628 bytes
- busybox static with xfs: 586188 bytes

So mkfs.xfs enlarges busybox static binary by 332560 bytes.

- busybox shared (no xfs): 187572 bytes
- busybox shared with xfs: 535424 bytes

So mkfs.xfs enlarges busybox dynamically linked binary by 347852 bytes.

The I compiled mkfs.xfs as a standalone application, using the same
compiler switches and source files.

(Yes, I mispelled the application as mfs.xfs.)

mfs.xfs: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV),
statically linked, stripped:
=> 411776 bytes

mfs.xfs: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV),
dynamically linked (uses shared libs), stripped
=> 375920 bytes

A naive comparision for the static binaries: when xfs enlarges busybox
by 332560 bytes and the standalone application is 411776 bytes, then
integrating it into busybox saves 79216 bytes.

For the dynamically linked version, it's 375920 - 347852 = 28068 bytes,
that are saved by integrating it into busybox.

I think that busybox's philosophy is to rewrite things to make it space
and memory efficient in order to achieve maximum savings.

I read about the controversy with e2fsprogs and if merely integrating
alien source code into busybox should be done at all.

So I won't vote for anything here, I just wanted to let you know the
results. 8-)

Please tell me what you think.

Best regards
Michael Hunold.



More information about the busybox mailing list