While Busybox offers us many essential Unix utilities, we still miss a few essential programs for our mission. We cannot partition a hard disk and we cannot create or repair ext2 file systems. Busybox can be made to include mkfs and fsck for Minix file systems, but not for the much more common Ext2 file system. Both util-linx and e2fsprogs complain if you had not built uClibc with large file support.
First start another shell and type the following command:
export PATH=/home/lennartb/myboot/uclibc-dev/bin:$PATHFrom now on, the uClibc version of gcc will be used instead of the normal version.
For now we need util-linux only for the fdisk utility. The build procedure is as follows:
-D__NO_CTYPE \This line must look like the other lines in the same statement, including the backslash with a space before it and nothing after it. 1
Now we will build e2fsprogs as follows:
./configure make BUILD_CC=/usr/bin/gcc
strip e2fsck/e2fsck.shared mv e2fsck/e2fsck.shared \ /home/lennartb/myboot/rootfs/sbin/e2fsck strip mke2fs mv misc/mke2fs /home/lennartb/myboot/rootfs/sbin
This is the time to build any other programs you will need. Link them with uClibc and move them to the one of the binary subdirectories in the myboot/rootfs directory. If linking with uClibc does not work, try to link statically using the ordinary gcc.