Building the Kernel

Now, assuming the architecture is x86, to build the kernel and modules just do the following: roo[email protected]: /usr/src/linux-2.6.16.46-0.12/ # make

This will build the kernel binary and all its modules. In older kernels it was necessary to build the kernel binary and the modules in two separate stages. This is no longer required, but if you wish (on x86 or x86_64) you can do make bzlmage followed by make modul es. Note that in bzlmage, b stands for big and z stands for compressed (there is no connection to bzip2 compression).

i- ■ i■ . The Makefile in the /usr/src/linux directory contains a number of different t-c '2 ^ ^.■¿'CV-.w s targets. By typing make help, you can see all possible arguments to the make command for this Makefile. One interesting option is to build the kernel as an RPM package.

In practice, if we simply type make, the effect is the same as make bzlmage followed by make modules, so it is instructive to issue the commands separately so that we can stop and look at what is happening, as seen in Listing 29-2.

Was this article helpful?

0 0

Post a comment