Buildroot on Linux 2.4

From GumstixDocsWiki

Jump to: navigation, search

The standard Buildroot does not work on Linux 2.4.x-based systems, due to an incompatibility in depmod.

depmod manages dependencies in kernel modules, and generates the data the kernel needs to load the modules in the correct sequence. The 2.6.x kernel used by the Gumstix uses a slightly different module format, which the depmod in 2.4.x does not understand.

The solution: download a newer version of module-init-tools, build it, and do not install it. This will give you a new, secondary copy of depmod for use while building the Buildroot.

Building depmod

First, grab the latest version of module-init-tools.

Do not do the next steps as root -- your system's existing copy of depmod is absolutely essential. If you make a mistake typing the commands below while running as root, you can overwrite depmod, leaving your Linux system dead.

Unpack and build the module-init-tools package with:

tar -xjvf <filename>
cd <filename without extension>
./configure 
make

Do not run make install.

In this directory will be your shiny new depmod.

Rebuilding the Buildroot

Now, return to the Buildroot directory and build it again, telling it where to find the new depmod binary:

make DEPMOD=<absolute path to new depmod>

Note that the absolute path is necessary (it's the complete path, i.e. /home/me/module-init-tools/depmod).

It will all work!

Personal tools