Busybox-like binaries which ext3 and ext4 support?

Compile e2fsprogs with static linking and choose the binaries you need from it. You probably only need mke2fs (which makes all kinda of EXT series file systems - mkfs.ext4 is just a symlink to it.

If you can't get static compiling to work, "ldd mke2fs" will at least show which libearies you need to install.


I executed the following commands to compile e2fsprogs pkg statically to target ARM:

apt-get install gcc-arm-linux-gnueabi

wget http://kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.6/e2fsprogs-1.42.6.tar.bz2

tar -jxvvf e2fsprogs-1.42.6.tar.bz2

cd e2fsprogs-1.42.6

./configure CFLAGS='-g -O2 -static' CC=arm-linux-gnueabi-gcc  --host=arm-linux-gnueabi

make

After a successful compilation, you will find the mke2fs binary under misc/ directory. To make sure you generated the correct binary, check the binary format:

$ file ./mke2fs*
./mke2fs: **ELF 32-bit LSB  executable**, **ARM,** EABI5 version 1 ...

Now, I copied this binary as it is to my target platform.

To format a partition with ext4:

mke2fs -t ext4  /dev/xxx