next up previous contents
Next: Populating the Root File Up: Making Linux Installation Disks Previous: Building Curses and dialog   Contents

Other Essential Binaries

While Busybox offers us many essential Unix utilities, we still miss a few essential programs for our mission. We cannot partition a hard disk, we cannot select an appropriate keyboard layout 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=$MYBOOT/uclibc-dev/usr/bin:$PATH
From 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 and cfdisk utilities. The build procedure is as follows:

Now we will build e2fsprogs as follows:

Now we still need to be able to load keyboard definitions for foreign keyboards. Now enter the kbd subdirectory. Run the local configure command and then create the file defines.h with the following contents:

#define LC_ALL 0
Now you can make the program without errors, but apparently it is a bit buggy. Move the loadkeys binary and key maps to the rootfs directory.
strip src/loadkeys
mv src/loadkeys $MYBOOT/rootfs/usr/bin
mkdir $MYBOOT/rootfs/usr/share/kbd
cp -a data/keymaps $MYBOOT/usr/share/kbd
Now you can weed out a lot of those keymap files that we do not need. Start with removing the amiga, atari, mac and sun directories. In the i386 directories there are probably only a few maps you want to keep, one for each country that your product may need to be used. All files that are left can be compressed with gzip. I kept the keymaps for Belgium, France, Germany, UK and US (used almost exclusively in the Netherlands) and all include directories (and these are probably not even needed). If you want to test loadkeys using the familiar chroot trick, this only works on a text console and you may need some of the device nodes already in place (see next chapter).

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.


next up previous contents
Next: Populating the Root File Up: Making Linux Installation Disks Previous: Building Curses and dialog   Contents
Lennart Benschop 2003-07-16