Linux – Compilando kernel CentOS e Debian

Compiling the kernel

Use the following sequence of make commands to build and install the kernel and modules:

  1. make clean
  2. make zImage/bzImage (utilizando somente o make sem os dois parâmetros por padrão é compilado no modo bzImage)
  3. make modules
  4. make modules_install

 

make clean

The “clean” argument removes old output files that may exist from previous kernel builds. These include core files, system map files and others.

make zImage/bzImage

The zImage and bzImage arguments both effectively build the kernel. The difference between these two is explained in zImage versus bzImage.

After the compile process the kernel image can be found in the /usr/src/linux/arch/i386/boot directory (on i386 systems).

make modules

The modules argument builds the modules; the device drivers and other items that were configured as modules.

make modules_install

The modules_install argument installs the modules you just compiled under /lib/modules/kernel-version. The kernel-version directory will be created if nonexistent.

 

CentOS compilando direto para o /boot

 

CentOS compilando gerando os pacotes .RPM

 

Debian compilando gerando os pacotes .DEB

 

Referências:

http://lpic2.unix.nl/ch02s02.html

Deixe um comentário