
56
To simplify building, all applications are shown to be linked statically.
For the next few steps we assume that the shell variables, BUSYBOX and MODUTILS, have
been set to the path of the sources for their namesakes. The variable INITRD should be set
to a temporary directory where the ramdisk will be built.
7.4.1 Configuring and Building BusyBox Applications
BusyBox is configured like the Linux kernel, using:
# make config
or:
# make menuconfig
Once the
.config
file has been generated in the BusyBox source directory, build the
BusyBox applications with:
# cd ${BUSYBOX}/
# make dep
# make
# make install
This places the BusyBox applications into the
${BUSYBOX}/_install/
directory
7.4.2 Building modutils or module-init-tools
You only need the statically linked
insmod(8)
. First, configure
modutils
for 2.4
kernels or
module-init-tools
for 2.6 kernels:
# cd ${MODUTILS}/
# ./configure --disable-insmod-static \
--enable-combined --enable-strip --disable-combined
Next, build it:
# make
At the point, the
make(1)
utility may generate errors. However, we’ve found those errors
to be in sections of the BusyBox utilities that are not needed for the ramdisk. After
make(1)
returns perform the following steps:
# cd insmod
# make insmod.static
# strip insmod.static