Section 4.3. Building the Kernel


4.3. Building the Kernel

Now that you have created a kernel configuration that you wish to use, you need to build the kernel. This is as simple as entering a one-word command:

 $ make   CHK     include/linux/version.h   UPD     include/linux/version.h   SYMLINK include/asm -> include/asm-i386   SPLIT   include/linux/autoconf.h -> include/config/*   CC      arch/i386/kernel/asm-offsets.s   GEN     include/asm-i386/asm-offsets.h   CC      scripts/mod/empty.o   HOSTCC  scripts/mod/mk_elfconfig   MKELF   scripts/mod/elfconfig.h   HOSTCC  scripts/mod/file2alias.o   HOSTCC  scripts/mod/modpost.o   HOSTCC  scripts/mod/sumversion.o   HOSTLD  scripts/mod/modpost   HOSTCC  scripts/kallsyms   HOSTCC  scripts/conmakehash   HOSTCC  scripts/bin2c   CC      init/main.o   CHK     include/linux/compile.h   UPD     include/linux/compile.h   CC      init/version.o   CC      init/do_mounts.o ... 

Running make causes the kernel build system to use the configuration you have selected to build a kernel and all modules needed to support that configuration.[*] While the kernel is building, make displays the individual filenames of what is currently happening, along with any build warnings or errors.

[*] Older kernel versions prior to the 2.6 release required the additional step of make modules to build all needed kernel modules. That is no longer required.

If the kernel build finished without any errors, you have successfully created a kernel image. However, it needs to be installed properly before you try to boot from it. See Chapter 5 for how to do this.

It is very unusual to get any build errors when building a released kernel version. If you do, please report them to the Linux kernel developers so they can be fixed.



Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net