Compilarea kernelului 2.6 mini-how-to - the Debian way
     media: 0.00 din 0 voturi

postat de firefly in 2006-10-09 19:21
Pentru a putea compila kernelul in stil Debian aveti nevoie de niste pachete suplimentare. Lansati un terminal si dati comanda:

#apt-get install make gcc bin86 libc6-dev kernel-package module-init-tools

Cele instalate ar trebui sa fie ok pentru o configurare in consola cu menuconfig (s-ar putea sa mai aveti nevoie si de ncurses-dev). De asemenea, daca doriti sa compilati kernelul cu initrd mai instalati si initrd-tools.

Daca doriti sa configurati kernelul in X aveti 2 optiuni: xconfig si gconfig.
In 2.6 xconfig foloseste interfata QT, deci daca folositi KDE ar trebui sa instalati:

#apt-get install libqt3-dev make gcc bin86 libc6-dev kernel-package module-init-tools

Sau daca folositi Gnome sau doriti interfata gtk:

#apt-get install libglade2-dev make gcc bin86 libc6-dev kernel-package module-init-tools

Instalati sursele kernelului:

#apt-get install kernel-source-2.6.11

Eu va recomand kernelele din distributie deoarece includ bugfixuri si patch-uri:

#firefly:~# apt-cache search kernel-source-2.6 --names-only
#kernel-source-2.6.11 - Linux kernel source for version 2.6.11 with Debian patches
#kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian patches


Dezarhivati sursele si creati un symlink la director:

#cd /usr/src
#tar jxf kernel-source-2.6.11.tar.bz2
#ln -s kernel-source-2.6.11 linux

Configurati kernelul (configurarea nu face obiectul acestui mini-how-to):

#cd /usr/src/linux

Folosind interfata ncurses, in terminal:
#make menuconfig

... sau folosind interfata QT:
#make xconfig

... sau folosind interfata GTK:
#make gconfig

Compilati kernelul:
#make-kpkg kernel_image

... sau creati kernelul cu initrd:
#make-kpkg --initrd kernel_image

... va aparea un warning message care il ignorati:
firefly:/usr/src/linux# make-kpkg --initrd kernel_image
Warning: You are using the initrd option, that may not
work, depending on your kernel version and architecture,
unless you have applied the initrd cramfs patch to
the kernel, or modified mkinitrd not to use cramfs by
default. The cramfs initrd patch, is included in the
Debian supplied kernel sources. New kernels on most
architectures do work fine.
By default, I assume you know what you are doing, and I
apologize for being so annoying. Should I abort[Ny]?

Aceasta va compila kernelul si va crea un pachet kernel-image-2.6.11_10.00.Custom_i386.deb pe care il instalati:

#cd /usr/src
#dpkg -i kernel-image-2.6.11_10.00.Custom_i386.deb

Daca folositi initrd nu uitati sa verificati daca /etc/lilo.conf are optiunea initrd=/initrd.img in sectiunea noului kernel ...

Comentarii


    Comentariile sunt interzise la blogurile neactualizate mai mult de 90 de zile


    Termeni si Conditii de Utilizare